Files
meatballcraft/scripts/mixin/AedialClientVSServer/AstralRelayRenderFixClient.txt
T
Alexander 5788c5a938 0.18.6.4 (reconstructed from the official server pack)
Upstream released 0.18.6.4 on CurseForge (Aug 16 2026) but never committed
it; GitHub main is still at e80fcdfd (0.18.6.3, Aug 9). Reconstructed here
the same way 0.18.5-hotfix2 was.

Source: Meatballcraft-Server-prerelease-0.18.6.4.zip (the official server
pack), NOT a played instance. An earlier attempt sourced from the local
Prism instance showed 842 changed files; almost all of that was runtime
drift from a played world. The pristine zip gives 27.

  config/, scripts/, pillar/, structures/, AlternativeConfigs/
      <- server pack (pristine)
  resources/            <- Prism instance (client-only, absent from the
                           server pack; unchanged apart from one new model)
  manifest.json, modlist.html
      <- Prism instance flame/ metadata (client pack files, version
         prerelease-0.18.6.4, 374 mods)

The server pack ships CRLF; this repo is LF. Line endings were normalised
to LF so the diff carries content only - the raw copy was 4613 files and
1.08M lines of pure CRLF churn.

Notable: upstream now ships the three AedialClientVSServer client mixin
scripts renamed .zs -> .txt (disabled), which is the same change the
hotfix2 reconstruction made independently. Git records them as R100.

Not reconstructed:
- modlist_files.txt, left at 0.18.6.3. The server pack lists 398 server
  jars; this file holds 364 client entries and its provenance is unclear,
  so writing the server list would be wrong.
- Deletions outside scripts/. The server pack omits client-only mods, so
  absence there does not imply removal from the pack. scripts/ is fully
  present server-side and was checked: the three renames above were the
  only stale files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-18 13:11:39 +02:00

61 lines
2.2 KiB
Plaintext

#modloaded astralsorcery
#loader mixin
#sideonly client
import native.hellfirepvp.astralsorcery.common.tile.TileAttunementRelay;
import native.net.minecraft.client.Minecraft;
import native.net.minecraft.client.renderer.GlStateManager;
import native.net.minecraft.client.renderer.RenderHelper;
import native.net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import native.net.minecraft.item.ItemStack;
import native.net.minecraft.util.math.MathHelper;
import mixin.CallbackInfo;
// Replace TESRAttunementRelay's item rendering so TEISR items (e.g., DivineRPG statues) render correctly
#mixin {targets: "hellfirepvp.astralsorcery.client.render.tile.TESRAttunementRelay"}
zenClass MixinTESRAttunementRelay_RenderFix {
#mixin Inject
#{
# method: "render",
# at: { value: "HEAD" },
# cancellable: true
#}
function replaceRender(te as TileAttunementRelay, x as double, y as double, z as double, partialTicks as float, destroyStage as int, alpha as float, ci as CallbackInfo) as void {
// Replicate original slot checks; if empty, suppress original render too
val inv = te.getInventoryHandler();
if (inv == null) {
ci.cancel();
return;
}
val stack as ItemStack = inv.getStackInSlot(0);
if (stack.isEmpty()) {
ci.cancel();
return;
}
GlStateManager.pushMatrix();
// Slow spin based on ticks + partialTicks
val PI as double = 3.1415927; // Math.PI
val t as double = (te.getTicksExisted() as double + partialTicks) % 360.0;
val angle as float = ((t * 2.0) % 360.0) as float;
val bob as float = MathHelper.sin((t / 10.0) % (2 * PI)) * 0.03;
GlStateManager.translate(x + 0.5, y + 0.6, z + 0.5);
GlStateManager.rotate(angle, 0.0, 1.0, 0.0);
GlStateManager.scale(0.625, 0.625, 0.625);
RenderHelper.enableStandardItemLighting();
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.FIXED);
RenderHelper.disableStandardItemLighting();
GlStateManager.popMatrix();
// Fully replace original method body
ci.cancel();
}
}