Skip to content

Commit

Permalink
Update to 1.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Sep 14, 2022
1 parent a95b50f commit c9f5d00
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,6 @@ protected void init() {

public void updateMatrices(MatrixStack modelViewStack, Matrix4f projectionMatrix) {
this.projectionViewMatrix = projectionMatrix.copy();
this.projectionViewMatrix.multiply(modelViewStack.peek().getPosition());
this.projectionViewMatrix.multiply(modelViewStack.peek().getModel());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private int getAttritionLength(BlockPos target) {
}

@Override
public ItemStack transferSlot(PlayerEntity player, int index) {
public ItemStack quickTransfer(PlayerEntity player, int index) {
return ItemStack.EMPTY;
}
}
28 changes: 4 additions & 24 deletions src/main/java/ladysnake/requiem/compat/OriginsCompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,13 @@
import ladysnake.requiem.common.gamerule.StartingRemnantType;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.resource.ResourceManager;
import net.minecraft.resource.ResourceType;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.quiltmc.qsl.resource.loader.api.ResourceLoader;
import org.quiltmc.qsl.resource.loader.api.reloader.SimpleSynchronousResourceReloader;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;

public final class OriginsCompat {
public static final ComponentKey<OriginComponent> ORIGIN_KEY = ModComponents.ORIGIN;
Expand Down Expand Up @@ -111,6 +107,7 @@ public final class OriginsCompat {

public static final Identifier SOUL_TYPE_LAYER_ID = Requiem.id("soul_type");
public static final Identifier ORIGIN_MANAGER_RESOURCE_ID = new Identifier("origins", "origins");
public static final Identifier ORIGIN_LAYERS_RESOURCE_ID = new Identifier("origins", "origin_layers");
public static final Identifier VAGRANT_ORIGIN_ID = Requiem.id("vagrant");

private static void applyVagrantOrigin(PlayerEntity player) {
Expand Down Expand Up @@ -140,26 +137,9 @@ public static void init() {
}
}
});
OriginDataLoadedCallback.EVENT.register(client -> {
// see Requiem#571 and calio#3, serverside ordering is wrong
if (client) OriginRegistry.get(VAGRANT_ORIGIN_ID).setSpecial();
});
ResourceLoader.get(ResourceType.SERVER_DATA).registerReloader(new SimpleSynchronousResourceReloader() {
@Override
public void reload(ResourceManager manager) {
OriginRegistry.get(VAGRANT_ORIGIN_ID).setSpecial();
}

@Override
public Identifier getQuiltId() {
return Requiem.id("origins_origin_tweaker");
}

@Override
public Collection<Identifier> getQuiltDependencies() {
return Set.of(ORIGIN_MANAGER_RESOURCE_ID);
}
});
// Fix for Requiem#571, ensure layers are loaded after origins, ensuring in turn that origins are loaded during the callback
ResourceLoader.get(ResourceType.SERVER_DATA).addReloaderOrdering(ORIGIN_MANAGER_RESOURCE_ID, ORIGIN_LAYERS_RESOURCE_ID);
OriginDataLoadedCallback.EVENT.register(client -> OriginRegistry.get(VAGRANT_ORIGIN_ID).setSpecial());
RequiemCompatibilityManager.registerShellDataCallbacks(OriginsCompat.ORIGIN_HOLDER_KEY);
RequiemCompatibilityManager.registerShellDataCallbacks(OriginsCompat.APOLI_HOLDER_KEY);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void test(ServerWorld world, double x, double y, double z, CallbackInfoR
if (cir.getReturnValueZ() && this.requiem$biomeTag != null) {
BlockPos blockPos = new BlockPos(x, y, z);

if (!world.getBiome(blockPos).hasTag(this.requiem$biomeTag)) {
if (!world.getBiome(blockPos).isIn(this.requiem$biomeTag)) {
cir.setReturnValue(false);
}
}
Expand Down

0 comments on commit c9f5d00

Please sign in to comment.