Jump to content

org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered


Qel

Recommended Posts

  

14 minutes ago, Qel said:

i encountered this error while i was trying to open a dedicated server with mods. we played other modpacks before with my friend, then we decided make one on our own, but now it's says org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered crash log below

2023-02-15 18:24:02,584 main WARN Advanced terminal features are not available in this environment
[18:24:02] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.1.47, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853]
[18:24:02] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.6 by Oracle Corporation; OS Windows 10 arch amd64 version 10.0
[18:24:03] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/omert/OneDrive/Masaüstü/minecolonies/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER
[18:24:04] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\omert\OneDrive\Masaüstü\minecolonies\libraries\net\minecraftforge\fmlcore\1.19.2-43.1.47\fmlcore-1.19.2-43.1.47.jar is missing mods.toml file
[18:24:04] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\omert\OneDrive\Masaüstü\minecolonies\libraries\net\minecraftforge\javafmllanguage\1.19.2-43.1.47\javafmllanguage-1.19.2-43.1.47.jar is missing mods.toml file
[18:24:04] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\omert\OneDrive\Masaüstü\minecolonies\libraries\net\minecraftforge\lowcodelanguage\1.19.2-43.1.47\lowcodelanguage-1.19.2-43.1.47.jar is missing mods.toml file
[18:24:04] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\omert\OneDrive\Masaüstü\minecolonies\libraries\net\minecraftforge\mclanguage\1.19.2-43.1.47\mclanguage-1.19.2-43.1.47.jar is missing mods.toml file
[18:24:05] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 12 dependencies adding them to mods collection
[18:24:09] [main/INFO] [mixin/]: Compatibility level set to JAVA_17
[18:24:09] [main/ERROR] [mixin/]: Mixin config mixin.cleancut.json does not specify "minVersion" property
[18:24:10] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [ca.spottedleaf.starlight.mixin.MixinConnector]
[18:24:10] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeserver' with arguments []
[18:24:10] [main/WARN] [mixin/]: Reference map 'naturalist-forge-forge-refmap.json' for naturalist.mixins.json could not be read. If this is a development environment you can ignore this message
[18:24:10] [main/INFO] [Rubidium/]: Loaded configuration file for Rubidium: 29 options available, 0 override(s) found
[18:24:10] [main/INFO] [fpsreducer/]: OptiFine was NOT detected.
[18:24:10] [main/INFO] [fpsreducer/]: OptiFabric was NOT detected.
[18:24:10] [main/WARN] [mixin/]: Reference map 'memorysettings.refmap.json' for memorysettings.mixins.json could not be read. If this is a development environment you can ignore this message
[18:24:10] [main/WARN] [mixin/]: Reference map 'fallingthrough.refmap.json' for fallingthrough.mixins.json could not be read. If this is a development environment you can ignore this message
[18:24:10] [main/WARN] [mixin/]: Reference map 'shieldmechanics.refmap.json' for shieldmechanics.mixins.json could not be read. If this is a development environment you can ignore this message
[18:24:11] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/model/IronGolemModel (java.lang.ClassNotFoundException: net.minecraft.client.model.IronGolemModel)
[18:24:11] [main/WARN] [mixin/]: @Mixin target net.minecraft.client.model.IronGolemModel was not found strawgolem.mixins.json:IronGolemModelMixin
[18:24:11] [main/WARN] [mixin/]: Error loading class: de/maxhenkel/gravestone/events/DeathEvents (java.lang.ClassNotFoundException: de.maxhenkel.gravestone.events.DeathEvents)
[18:24:20] [main/INFO] [minecraft/DataFixers]: Building unoptimized datafixer
[18:24:23] [main/ERROR] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/KeyMapping for invalid dist DEDICATED_SERVER
[18:24:23] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/KeyMapping (java.lang.RuntimeException: Attempted to load class net/minecraft/client/KeyMapping for invalid dist DEDICATED_SERVER)
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
        at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$launchService$0(CommonServerLaunchHandler.java:29)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
        ... 7 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120)
        at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50)
        at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:113)
        at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219)
        at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229)
        at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219)
        at cpw.mods.securejarhandler/cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        at TRANSFORMER/[email protected]/net.minecraft.world.inventory.MenuType.<clinit>(MenuType.java:7)
        at TRANSFORMER/[email protected]/net.minecraft.core.Registry.m_235768_(Registry.java:230)
        at TRANSFORMER/[email protected]/net.minecraft.core.Registry.lambda$internalRegister$54(Registry.java:461)
        at TRANSFORMER/[email protected]/net.minecraft.core.Registry.lambda$static$70(Registry.java:667)
        at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
        at TRANSFORMER/[email protected]/net.minecraft.core.Registry.<clinit>(Registry.java:666)
        at TRANSFORMER/[email protected]/net.minecraft.server.Bootstrap.m_135870_(Bootstrap.java:43)
        at TRANSFORMER/[email protected]/net.minecraft.server.Main.main(Main.java:110)
        ... 13 more
Caused by: org.spongepowered.asm.mixin.throwables.ClassMetadataNotFoundException: net.minecraft.client.KeyMapping
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:754)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:739)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:310)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:280)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1288)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:292)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365)
        at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
        ... 34 more

      mod list:

Limited Chunkloading[Forge/Fabric] (by someaddon)

Storage Drawers (by Texelsaur)

The Graveyard (FORGE) (by finallion_13)

Death Counter (Forge) (by ohaiiChun)

Dynamic View[Forge] (by someaddon)

Better Advancements (by way2muchnoise)

AutoRegLib (by Vazkii)

Dusk[Forge/Fabric] (by someaddon)

BlockUI (by H3lay)

Carry On (by Tschipp)

Oh The Biomes You'll Go (by AOCAWOL)

Goblin Traders (by MrCrayfish)

Hostile Villages (by someaddon)

Fresh Animations (by Fresh__LX)

Neat (by Vazkii)

TerraBlender (Forge) (by TheAdubbz)

Potions Master (by thevortexFoxTopia)

Shield mechanics (by someaddon)

GeckoLib (by ThanosGecko)

Sophisticated Core (by P3pp3rF1y)

Memory Settings[Forge/Fabric] (by someaddon)

Upgraded Netherite : Items (by Rolfmao25)

Comforts (Fabric/Forge/Quilt) (by TheIllusiveC4)

Loot Integrations[Forge/Fabric] (by someaddon)

Corail Tombstone (by Corail_31)

Vanilla Plus Tools (by H3lay)

Structurize (by H3lay)

Silent Lib (silentlib) (by SilentChaos512)

Clickable advancements[Forge/Fabric] (by someaddon)

Corpse (by henkelmax)

Lazy DataFixerUpper(LazyDFU) [FORGE] (by Corgi_Taco)

AppleSkin (by squeek502)

Harder Spawners (by MacTso)

Magnesium/Rubidium Extras (by TeamDeusVult)

Copperized (by brdbrn)

Balm (Forge Edition) (by BlayTheNinth)

Copper Drops (by brdbrn)

Hourglass (by DuckyCrayfish)

Savage Ender Dragon[Forge/Fabric] (by someaddon)

Cooking for Blockheads (by BlayTheNinth)

Clumps (by Jaredlll08)

Login Protection[Forge/Fabric] (by someaddon)

FPS Reducer (by bre2el)

Mouse Tweaks (by YaLTeR)

Domum Ornamentum (by OrionOnline)

Enchantment Descriptions (by DarkhaxDev)

L_Ender 's Cataclysm (by mcl_ender)

Global Packs (by JTK222)

Jade 🔍 (by Snownee_)

Falling Leaves (Forge) (by Cheaterpaul)

Spice of Life: Carrot Edition (by lordcazsius)

TexTrue's Rubidium Options (by TexTrue)

Stay True Modded Compats (by wedge1453)

Not Enough Crashes (Forge) (by NatanFudge)

Unstructured [Fabric/Forge] (by Cristelknight)

Rubidium (by Asek3)

Upgraded Netherite (by Rolfmao25)

Polymorph (Forge) (by TheIllusiveC4)

When Dungeons Arise - Forge! (by Aureljz)

Better Fps - Render Distance[Forge] (by someaddon)

Farmer's Delight (by vectorwing)

Bookshelf (by DarkhaxDev)

Storage Racks (by H3lay)

William Wythers' Overhauled Overworld (by Cristelknight)

Multi-Piston (by H3lay)

Connectivity[Forge/Fabric] (by someaddon)

Biomes O' Plenty (by Forstride)

Farsight [Forge] (by someaddon)

Origins: Classes (Forge) (by LimonBlaze)

Creeper Overhaul (by joosh_7889)

Alex's Delight (by NCP_Bails)

Kobolds! (by Jusey1z)

Spoorn Armor Attributes [Fabric/Forge] (by spoorn)

Scaling Health (by SilentChaos512)

Ecologics (by SameDifferent)

Enhanced Farming (by Mrbysco)

Delightful (by brdbrn)

Quark (by Vazkii)

Corail Woodcutter (by Corail_31)

Infused Foods (by ApexMdr)

MineColonies (by H3lay)

Towns and Towers (by Biban_Auriu)

Deeper and Darker (by KyaniteMods)

JourneyMap (by techbrew)

TrashSlot (by BlayTheNinth)

HT's TreeChop (by hammertater)

Caelus API (Forge) (by TheIllusiveC4)

Alex's Mobs (by sbom_xela)

Sophisticated Backpacks (by P3pp3rF1y)

Saturn (by AbdElAziz333)

Citadel (by sbom_xela)

FerriteCore (Forge) (by malte0811)

Server Performance - Smooth Chunk Save[Forge/Fabric] (by someaddon)

Straw Golem Rebaled - Forge (by CommodoreThrawn)

FallingTree (Forge&Fabric) (by rakambda)

Origins (Forge) (by EdwinMindcraft)

Fast Leaf Decay (by olafskiii)

Starlight (Forge) (by Spottedstar)

Entity Collision FPS Fix (by Corgi_Taco)

Cloth Config API (Fabric/Forge) (by shedaniel)

GUI Scale[Forge/Fabric] (by someaddon)

Just Enough Items (JEI) (by mezz)

Entity Culling Fabric/Forge (by tr9zw)

Better With Minecolonies [Forge] (by Kreezxil)

Curios API (Forge) (by TheIllusiveC4)

Cave Spelunking[Forge/Fabric] (by someaddon)

BisectHosting Server Integration Menu [FORGE] (by BisectHosting)

Kotlin for Forge (by thedarkcolour)

Better Mods Button (by Fuzs_)

CreativeCore (by CreativeMD)

Corail Woodcutter Extension (by Corail_31)

Epic Knights: Shields, Armor and Weapons [Fabric & Forge] (by magistu_)

Falling Through - Dimension Stacking[Forge/Fabric] (by someaddon)

Naturalist (by Starfish_Studios)

The Twilight Forest (by Benimatic)

CleanCut (by Rongmario)

spark (by Iucko)

Upgraded Core (by Rolfmao25)

Crafting Tweaks (by BlayTheNinth)

Architectury API (Fabric/Forge) (by shedaniel)

PlayerRevive (by CreativeMD)

MVS - Moog's Voyager Structures (by finndog_123)

AmbientSounds 5 (by CreativeMD)

Cursery[Forge/Fabric] (by someaddon)

Brutal Bosses - Dungeon Bosses (by someaddon)

KleeSlabs (by BlayTheNinth)

Additional Structures (by XxRexRaptorxX)

Library Ferret - Forge (by jtl_elisa)

XL Packets (by tfarecnim)

Spoorn Weapon Attributes [Fabric/Forge] (by spoorn)

 

 

 

Edited by Qel
Link to comment
Share on other sites

21 hours ago, Qel said:

[18:24:23] [main/WARN] [mixin/]: Error loading class: net/minecraft/client/KeyMapping (java.lang.RuntimeException: Attempted to load class net/minecraft/client/KeyMapping for invalid dist DEDICATED_SERVER)

It seems you are loading client only mods on the server, so you need to remove them. I believe one of them is Better FPS at a quick glance, but there are probably more.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • i keep getting these errors and im not sure how to fix them or if i can just leave them be :PS i know about the missing tags i just dont have the mods required to add those extra villages Here is the log  https://paste.ee/p/KpYoV
    • Minecraft: 1.18.2, Forge: 40.2.21 I created some code that renders a custom particle. The particle renders without depth test: `disableDepthTest()` and should be visible through other blocks. Locally, all works fine. When I install it on the server and client, it also works fine. But when the mod is removed from the server, it no longer works.   The particle is registered under the name "DEPTH_VISION", and if i check if it is present `ModParticles.DEPTH_VISION.isPresent()`, while the mod is not on the server, I get a `false` back.   So my question is: - Is it even possible to make a custom particle, while staying client side only? - What do I need to change to make it work?    ModParticles.java import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.core.particles.ParticleType; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; public class ModParticles { public static final DeferredRegister<ParticleType<?>> REGISTRY = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, SomeNameMod.MODID); public static final RegistryObject<SimpleParticleType> DEPTH_VISION = REGISTRY.register("depth_vision", () -> new SimpleParticleType(true)); }    SomeNameMod.java import com.peet.somename.HighlightBlock; import com.peet.somename.DepthVisionParticle; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.core.particles.ParticleType; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.client.event.ParticleFactoryRegisterEvent; import net.minecraftforge.client.event.TextureStitchEvent; @Mod(com.peet.somename.SomeNameMod.MODID) public class SomeNameMod { public static final String MODID = "somename"; private static int tickCounter = 0; // Counter to track ticks public SomeNameMod() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); modEventBus.addListener(this::onTextureStitch); modEventBus.addListener(this::registerParticleFactories); ModParticles.REGISTRY.register(modEventBus); MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void registerParticleFactories(ParticleFactoryRegisterEvent event) { Minecraft.getInstance().particleEngine.register((ParticleType) ModParticles.DEPTH_VISION.get(), DepthVisionParticle.Factory::new); } @SubscribeEvent public void onWorldTick(TickEvent.WorldTickEvent event) { if (event.phase == TickEvent.Phase.END) { Level world = event.world; if (!world.isClientSide) return; if (tickCounter++ >= 20) { // 5 seconds = 100 ticks Player player = Minecraft.getInstance().player; if (player != null) { HighlightBlock.spawnParticles(world, player); } tickCounter = 0; // Reset the counter after spawning particles } } } @SubscribeEvent public void onClientTick(TickEvent.ClientTickEvent event) { } @SubscribeEvent public void onTextureStitch(TextureStitchEvent.Pre event) { if (event.getAtlas().location().equals(TextureAtlas.LOCATION_PARTICLES)) { event.addSprite(new ResourceLocation(MODID, "particles/depth_vision")); } } }    HighlightBlock.java import com.peet.somename.ModParticles; import net.minecraft.network.chat.TextComponent; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.ParticleEngine; public class HighlightBlock { public static <ExceptionType> void spawnParticles(Level world, Player player ) { ParticleEngine particleEngine = Minecraft.getInstance().particleEngine; if (!ModParticles.DEPTH_VISION.isPresent()) { Minecraft.getInstance().player.sendMessage(new TextComponent("DEPTH_VISION particle is not registered."), Minecraft.getInstance().player.getUUID()); return; } particleEngine.createParticle(ModParticles.DEPTH_VISION.get(), 0, 0, 0, 0.0, 0.0, 0.0); } }    DepthVisionParticle.java package com.peet.somename.particles; import net.minecraft.client.particle.Particle; import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.client.particle.ParticleProvider; import com.mojang.blaze3d.vertex.Tesselator; import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.client.renderer.texture.TextureManager; import com.mojang.blaze3d.vertex.BufferBuilder; import net.minecraft.world.entity.player.Player; import net.minecraft.client.Minecraft; import net.minecraft.client.Camera; import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.particle.SpriteSet; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.ParticleRenderType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraft.client.particle.SimpleAnimatedParticle; @OnlyIn(Dist.CLIENT) public class DepthVisionParticle extends SimpleAnimatedParticle { private static final ParticleRenderType DEPTH_PARTICLE_SHEET_TRANSLUCENT; private DepthVisionParticle(final ClientLevel world, final double x, final double y, final double z, final double motionX, final double motionY, final double motionZ, final SpriteSet spriteWithAge) { super(world, x, y, z, spriteWithAge, 0.0f); this.xd = motionX; this.yd = motionY; this.zd = motionZ; this.lifetime = 20; this.setSpriteFromAge(spriteWithAge); } public void render(final VertexConsumer buffer, final Camera renderInfo, final float partialTicks) { final Player player = Minecraft.getInstance().player; super.render(buffer, renderInfo, partialTicks); } public void tick() { super.tick(); this.setSprite(this.sprite); if (this.age++ >= this.lifetime) { this.remove(); } } public ParticleRenderType getRenderType() { return com.peet.somename.particles.DepthVisionParticle.DEPTH_PARTICLE_SHEET_TRANSLUCENT; } static { DEPTH_PARTICLE_SHEET_TRANSLUCENT = new ParticleRenderType() { public void begin(BufferBuilder buffer, TextureManager textureManager) { RenderSystem.disableDepthTest(); ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT.begin(buffer, textureManager); } public void end(Tesselator tessellator) { ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT.end(tessellator); RenderSystem.enableDepthTest(); } }; } @OnlyIn(Dist.CLIENT) public static class Factory implements ParticleProvider<SimpleParticleType> { private final SpriteSet spriteSet; public Factory(final SpriteSet spriteSet) { this.spriteSet = spriteSet; } public Particle createParticle(final SimpleParticleType type, final ClientLevel world, final double x, final double y, final double z, final double xSpeed, final double ySpeed, final double zSpeed ) { final com.peet.somename.particles.DepthVisionParticle particle = new com.peet.somename.particles.DepthVisionParticle(world, x, y, z, 0.0, 0.0, 0.0, this.spriteSet); particle.setParticleSpeed((float) xSpeed, (float) ySpeed, (float) zSpeed); return particle; } } }  
    • no, but do you know  any alternatives that will give me access to shaders?
    • I used an alternative for this, this is a sheet template, which helped me simplify my task and I did not have to count, because every time I start counting again, I always get confused. In the same way, when I change something, in the template, I can edit everything and put it in the order I need.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.