Skip to content

Commit

Permalink
Initial update to 1.19.3 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benonardo authored Feb 11, 2023
1 parent ff90194 commit fb05423
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
}

Expand Down
15 changes: 7 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19.2
yarn_mappings=1.19.2+build.10
loader_version=0.14.9
minecraft_version=1.19.3
loader_version=0.14.11

#Fabric api
fabric_version=0.60.0+1.19.2
fabric_version=0.68.1+1.19.3
# Mod Properties
mod_version=0.1.4
mod_version=0.1.5
maven_group=com.noxcrew
archives_base_name=noxesium

# Mod dependencies
# sodium is using commit from mc1.19-0.4.2
sodium = mc1.19.2-0.4.4
iris = 1.19.x-v1.3.0
modmenu = 4.0.5
sodium = mc1.19.3-0.4.6
iris = 1.19.3-v1.4.6
modmenu = 5.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.GameType;
Expand Down Expand Up @@ -52,7 +53,7 @@ public void shouldRenderBlockOutline(CallbackInfoReturnable<Boolean> cir) {
BlockPos blockPos = ((BlockHitResult) hitResult).getBlockPos();
if (this.minecraft.gameMode.getPlayerMode() != GameType.SPECTATOR) {
BlockInWorld blockInWorld = new BlockInWorld(this.minecraft.level, blockPos, false);
Registry<Block> registry = this.minecraft.level.registryAccess().registryOrThrow(Registry.BLOCK_REGISTRY);
Registry<Block> registry = this.minecraft.level.registryAccess().registryOrThrow(Registries.BLOCK);

// Allow global can destroy or can place on to override and render the outline anyways
if (ServerRules.GLOBAL_CAN_DESTROY.get().test(registry, blockInWorld) || ServerRules.GLOBAL_CAN_PLACE_ON.get().test(registry, blockInWorld)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.noxcrew.noxesium.rule.ServerRules;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.GameType;
Expand Down Expand Up @@ -35,7 +36,7 @@ private void injected(Level level, BlockPos blockPos, GameType gameType, Callbac

// Only override it if you're being denied the block modification
if (cir.getReturnValue()) {
cir.setReturnValue(!ServerRules.GLOBAL_CAN_DESTROY.get().test(level.registryAccess().registryOrThrow(Registry.BLOCK_REGISTRY), new BlockInWorld(level, blockPos, false)));
cir.setReturnValue(!ServerRules.GLOBAL_CAN_DESTROY.get().test(level.registryAccess().registryOrThrow(Registries.BLOCK), new BlockInWorld(level, blockPos, false)));
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.noxcrew.noxesium.mixin.client.beacon;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Matrix4f;
import com.noxcrew.noxesium.render.GlobalBlockEntityRenderer;
import net.minecraft.client.Camera;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.RenderBuffers;
import net.minecraft.world.level.block.entity.BlockEntity;
import org.joml.Matrix4f;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Matrix3f;
import com.mojang.math.Matrix4f;
import com.mojang.math.Vector3f;
import com.mojang.math.Axis;
import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
Expand All @@ -17,6 +15,9 @@
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.phys.Vec3;
import org.apache.commons.lang3.tuple.Pair;
import org.joml.Matrix3f;
import org.joml.Matrix4f;
import org.joml.Vector3f;

import java.util.HashSet;
import java.util.List;
Expand Down Expand Up @@ -118,7 +119,7 @@ private static void renderNonTransparent(BeaconBlockEntity beaconBlockEntity, fl
float r = fs[1];
float s = fs[2];
poseStack.pushPose();
poseStack.mulPose(Vector3f.YP.rotationDegrees(n * 2.25f - 45.0f));
poseStack.mulPose(Axis.YP.rotationDegrees(n * 2.25f - 45.0f));
float ad = -1.0f + p;
float ae = (float) j * g * (0.5f / h) + ad;
renderPart(poseStack, buffer, q, r, s, 1.0f, i, m, 0.0f, h, h, 0.0f, -h, 0.0f, 0.0f, -h, 0.0f, 1.0f, ae, ad);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public boolean test(Registry<Block> registry, BlockInWorld blockInWorld) {
this.checksBlockEntity = false;
for (String string : input) {
try {
BlockPredicateArgument.Result result = BlockPredicateArgument.parse(HolderLookup.forRegistry(registry), new StringReader(string));
BlockPredicateArgument.Result result = BlockPredicateArgument.parse(registry.asLookup(), new StringReader(string));
this.checksBlockEntity |= result.requiresNbt();
if (result.test(blockInWorld)) {
this.lastResult = true;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"depends": {
"fabricloader": ">=0.14.8",
"fabric": "*",
"minecraft": ">=1.19.1",
"minecraft": ">=1.19.3",
"java": ">=17"
}
}

0 comments on commit fb05423

Please sign in to comment.