Jump to content

can you help me fix this bug? heres my crash log


Gecko

Recommended Posts

---- Minecraft Crash Report ----
// Uh... Did I do that?

Time: 2023-10-21 09:27:39
Description: Unexpected error

java.lang.NoSuchMethodError: 'net.minecraft.server.packs.resources.Resource net.minecraft.server.packs.resources.ResourceManager.m_142591_(net.minecraft.resources.ResourceLocation)'
    at team.creative.ambientsounds.AmbientEngine.loadAmbientEngine(AmbientEngine.java:145) ~[AmbientSounds_FORGE_v5.0.16_mc1.18.2.jar%23162!/:5.0.16] {re:classloading}
    at team.creative.ambientsounds.AmbientTickHandler.onTick(AmbientTickHandler.java:226) ~[AmbientSounds_FORGE_v5.0.16_mc1.18.2.jar%23162!/:5.0.16] {re:classloading}
    at team.creative.creativecore.CreativeForgeLoader.lambda$registerClientTick$6(CreativeForgeLoader.java:70) ~[CreativeCore_FORGE_v2.9.4_mc1.19.2%20(1).jar%23164!/:2.9.3] {re:classloading}
    at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.event.ForgeEventFactory.onPreClientTick(ForgeEventFactory.java:834) ~[forge-1.19.2-43.3.0-universal.jar%23174!/:?] {re:classloading}
    at net.minecraft.client.Minecraft.m_91398_(Minecraft.java:1718) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cgm.mixins.json:client.MinecraftMixin,pl:mixin:APP:enhancedvisuals.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1078) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cgm.mixins.json:client.MinecraftMixin,pl:mixin:APP:enhancedvisuals.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:700) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cgm.mixins.json:client.MinecraftMixin,pl:mixin:APP:enhancedvisuals.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.3.0.jar%23101!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at team.creative.ambientsounds.AmbientEngine.loadAmbientEngine(AmbientEngine.java:145) ~[AmbientSounds_FORGE_v5.0.16_mc1.18.2.jar%23162!/:5.0.16] {re:classloading}
    at team.creative.ambientsounds.AmbientTickHandler.onTick(AmbientTickHandler.java:226) ~[AmbientSounds_FORGE_v5.0.16_mc1.18.2.jar%23162!/:5.0.16] {re:classloading}
    at team.creative.creativecore.CreativeForgeLoader.lambda$registerClientTick$6(CreativeForgeLoader.java:70) ~[CreativeCore_FORGE_v2.9.4_mc1.19.2%20(1).jar%23164!/:2.9.3] {re:classloading}
    at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2385!/:?] {}
    at net.minecraftforge.event.ForgeEventFactory.onPreClientTick(ForgeEventFactory.java:834) ~[forge-1.19.2-43.3.0-universal.jar%23174!/:?] {re:classloading}
-- Last reload --
Details:
    Reload number: 1
    Reload reason: initial
    Finished: Yes
    Packs: Default, Mod Resources
Stacktrace:
    at net.minecraft.client.ResourceLoadStateTracker.m_168562_(ResourceLoadStateTracker.java:49) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:classloading}
    at net.minecraft.client.Minecraft.m_91354_(Minecraft.java:2287) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cgm.mixins.json:client.MinecraftMixin,pl:mixin:APP:enhancedvisuals.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:722) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:cgm.mixins.json:client.MinecraftMixin,pl:mixin:APP:enhancedvisuals.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.m_239872_(Main.java:212) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:51) ~[client-1.19.2-20220805.130853-srg.jar%23169!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
    at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27) ~[fmlloader-1.19.2-43.3.0.jar%23101!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-10.0.8.jar%2388!/:?] {}
    at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) [bootstraplauncher-1.1.2.jar:?] {}


-- System Details --
Details:
    Minecraft Version: 1.19.2
    Minecraft Version ID: 1.19.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 17.0.8, Microsoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
    Memory: 444352368 bytes (423 MiB) / 805306368 bytes (768 MiB) up to 2147483648 bytes (2048 MiB)
    CPUs: 16
    Processor Vendor: AuthenticAMD
    Processor Name: AMD Ryzen 9 4900HS with Radeon Graphics         
    Identifier: AuthenticAMD Family 23 Model 96 Stepping 1
    Microarchitecture: unknown
    Frequency (GHz): 2.99
    Number of physical packages: 1
    Number of physical CPUs: 8
    Number of logical CPUs: 16
    Graphics card #0 name: NVIDIA GeForce RTX 2060 with Max-Q Design
    Graphics card #0 vendor: NVIDIA (0x10de)
    Graphics card #0 VRAM (MB): 4095.00
    Graphics card #0 deviceId: 0x1f12
    Graphics card #0 versionInfo: DriverVersion=31.0.15.3640
    Graphics card #1 name: AMD Radeon(TM) Graphics
    Graphics card #1 vendor: Advanced Micro Devices, Inc. (0x1002)
    Graphics card #1 VRAM (MB): 512.00
    Graphics card #1 deviceId: 0x1636
    Graphics card #1 versionInfo: DriverVersion=30.0.13002.1001
    Memory slot #0 capacity (MB): 8192.00
    Memory slot #0 clockSpeed (GHz): 3.20
    Memory slot #0 type: DDR4
    Memory slot #1 capacity (MB): 8192.00
    Memory slot #1 clockSpeed (GHz): 3.20
    Memory slot #1 type: DDR4
    Virtual memory max (MB): 17709.59
    Virtual memory used (MB): 13775.17
    Swap memory total (MB): 1920.00
    Swap memory used (MB): 201.16
    JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
    Launched Version: 1.19.2-forge-43.3.0
    Backend library: LWJGL version 3.3.1 build 7
    Backend API: AMD Radeon(TM) Graphics GL version 3.2.14761 Core Profile Forward-Compatible Context 21.30.02.01 30.0.13002.1001, ATI Technologies Inc.
    Window size: 1920x1080
    GL Caps: Using framebuffer using OpenGL 3.2
    GL debug messages: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    Graphics mode: fancy
    Resource Packs: vanilla, mod_resources
    Current Language: English (US)
    CPU: 16x AMD Ryzen 9 4900HS with Radeon Graphics 
    OptiFine Version: OptiFine_1.19.2_HD_U_I2
    OptiFine Build: 20230623-171717
    Render Distance Chunks: 12
    Mipmaps: 4
    Anisotropic Filtering: 1
    Antialiasing: 0
    Multitexture: false
    Shaders: null
    OpenGlVersion: 3.2.14761 Core Profile Forward-Compatible Context 21.30.02.01 30.0.13002.1001
    OpenGlRenderer: AMD Radeon(TM) Graphics
    OpenGlVendor: ATI Technologies Inc.
    CpuCount: 16
    ModLauncher: 10.0.8+10.0.8+main.0ef7e830
    ModLauncher launch target: forgeclient
    ModLauncher naming: srg
    ModLauncher services: 
        mixin-0.8.5.jar mixin PLUGINSERVICE 
        eventbus-6.0.3.jar eventbus PLUGINSERVICE 
        fmlloader-1.19.2-43.3.0.jar slf4jfixer PLUGINSERVICE 
        fmlloader-1.19.2-43.3.0.jar object_holder_definalize PLUGINSERVICE 
        fmlloader-1.19.2-43.3.0.jar runtime_enum_extender PLUGINSERVICE 
        fmlloader-1.19.2-43.3.0.jar capability_token_subclass PLUGINSERVICE 
        accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE 
        fmlloader-1.19.2-43.3.0.jar runtimedistcleaner PLUGINSERVICE 
        modlauncher-10.0.8.jar mixin TRANSFORMATIONSERVICE 
        modlauncher-10.0.8.jar OptiFine TRANSFORMATIONSERVICE 
        modlauncher-10.0.8.jar fml TRANSFORMATIONSERVICE 
    FML Language Providers: 
        [email protected]
        lowcodefml@null
        javafml@null
    Mod List: 
        client-1.19.2-20220805.130853-srg.jar             |Minecraft                     |minecraft                     |1.19.2              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
        framework-forge-1.19.2-0.6.16.jar                 |Framework                     |framework                     |0.6.16              |DONE      |Manifest: 0d:78:5f:44:c0:47:0c:8c:e2:63:a3:04:43:d4:12:7d:b0:7c:35:37:dc:40:b1:c1:98:ec:51:eb:3b:3c:45:99
        alternacraft-1.19.2-Part-1-Release-1-Hotfix.jar   |AlternaCraft                  |alternacraft                  |1.0.0.1             |DONE      |Manifest: NOSIGNATURE
        AmbientSounds_FORGE_v5.0.16_mc1.18.2.jar          |Ambient Sounds                |ambientsounds                 |5.0.16              |DONE      |Manifest: NOSIGNATURE
        forge-1.19.2-43.3.0-universal.jar                 |Forge                         |forge                         |43.3.0              |DONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90
        cgm-forge-1.19.2-1.3.7.jar                        |MrCrayfish's Gun Mod          |cgm                           |1.3.7               |DONE      |Manifest: NOSIGNATURE
        soundphysics-forge-1.19.2-1.0.18 (1).jar          |Sound Physics Remastered      |sound_physics_remastered      |1.19.2-1.0.18       |DONE      |Manifest: NOSIGNATURE
        geckolib-forge-1.19-3.1.40.jar                    |GeckoLib                      |geckolib3                     |3.1.40              |DONE      |Manifest: NOSIGNATURE
        CreativeCore_FORGE_v2.9.4_mc1.19.2 (1).jar        |CreativeCore                  |creativecore                  |2.9.3               |DONE      |Manifest: NOSIGNATURE
        EnhancedVisuals_FORGE_v1.5.9_mc1.19.2.jar         |EnhancedVisuals               |enhancedvisuals               |1.5.9               |DONE      |Manifest: NOSIGNATURE
    Crash Report UUID: ad18e273-79e2-4236-8c6f-a46ea6980ef6
    FML: 43.3
    Forge: net.minecraftforge:43.3.0

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

    • Hello everyone.  I need help.  I'm relatively new to modding Minecraft and can't make heads-or-tails of the crash-logs.  I have both the actual crash report and the "latest" log file to look at. This only began happening recently, and I cannot figure out exactly what the cause is.  Some sources I've had look at it have said perhaps it's Cupboard.  Others have said it may be related to the Forgified API and "Connections", but I've attempted break-down with removing both of those and still have gotten the crashes. Regardless, I am uncertain what to do.  Admittedly I don't want to get rid of Cupboard, as I have several additional QOL mods that depend on it.  Also, I would like to know if there's an Embeddium-friendly version of Entity Texture Features, as apparently my version seems to have issue with it?  According to an Embeddium post near the top of the crash log. The files are enclosed below.  Thank you in advance. - TheMegaNerd    
    • 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?
  • Topics

×
×
  • Create New...

Important Information

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