67ba30e49b
Rebuilt from /root/server/Meatballcraft-Server-prerelease-0.18.5-hotfix2 (pct 1234) since the hotfix2 release was never committed upstream — upstream history jumps from89cbf41(0.18.5) to9bbd4be(partial lore, 0.18.6 dev). Synced config/, scripts/, pillar/, AlternativeConfigs/ to match the server byte-for-byte (92 files: 53 changed, 36 added, 3 client-only mixin scripts disabled via .zs -> .txt rename). Includes ~26 runtime-generated files (activity.json, tconstruct_oredictcache.dat, forge.cfg, ...) kept for exact parity with the server. Not synced: mods/ (untracked; hotfix2 bumped ~15 jars, see modlist_files.txt drift), resources/ (client-only, absent on server), manifest.json (client pack file, absent on server). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
61 lines
2.2 KiB
Plaintext
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();
|
|
}
|
|
}
|