Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Redstone Flux causing problem in Modpack


SaltySoviet
 Share

Recommended Posts

---- Minecraft Crash Report ----

WARNING: coremods are present:
  Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)
  EnderCorePlugin (EnderCore-1.12.2-0.5.31.jar)
  CTMCorePlugin (CTM-MC1.12-0.3.0.15.jar)
  LoadingPlugin (RandomThings-MC1.12.2-4.1.7.jar)
Contact their authors BEFORE contacting forge

// Ouch. That hurt :(

Time: 6/13/18 1:21 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Redstone Flux (redstoneflux)
Caused by: java.lang.RuntimeException: 
RedstoneFlux has detected that the following OLD API classes from CoFHLib are being repacked!
    cofh.api.energy.ItemEnergyContainer, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.EnergyStorage, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.IEnergyTransport, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.TileEnergyHandler, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.IEnergyConnection, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.IEnergyProvider, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.IEnergyHandler, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.IEnergyStorage, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.IEnergyContainerItem, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar
    cofh.api.energy.IEnergyReceiver, loaded from: CoFHLib-%5B1.7.10%5D1.2.1-185.jar

To prevent this crash, add "-Dcofh.rf.crashOnOldAPI=false" to your command line arguments.

    at cofh.redstoneflux.internal.OldAPIChecker.check(OldAPIChecker.java:64)
    at cofh.redstoneflux.RedstoneFlux.preInit(RedstoneFlux.java:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:627)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135)
    at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:627)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:245)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:466)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_144, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 3702266296 bytes (3530 MB) / 4294967296 bytes (4096 MB) up to 4294967296 bytes (4096 MB)
    JVM Flags: 5 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms4096m -Xmx4096m -XX:+UseG1GC -XX:MaxGCPauseMillis=4
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.42 Powered by Forge 14.23.4.2705 52 mods loaded, 52 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State | ID                                | Version                  | Source                                          | Signature                                |
    |:----- |:--------------------------------- |:------------------------ |:----------------------------------------------- |:---------------------------------------- |
    | UCH   | minecraft                         | 1.12.2                   | minecraft.jar                                   | None                                     |
    | UCH   | mcp                               | 9.42                     | minecraft.jar                                   | None                                     |
    | UCH   | FML                               | 8.0.99.99                | modpack.jar                                     | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | UCH   | forge                             | 14.23.4.2705             | modpack.jar                                     | e3c3d50c7c986df74c645c0ac54639741c90a557 |
    | UCH   | securitycraft                     | v1.8.4.1                 | [1.12.x]+SecurityCraft+v1.8.4.1.jar             | None                                     |
    | UCH   | actuallyadditions                 | 1.12.2-r135              | ActuallyAdditions-1.12.2-r135.jar               | None                                     |
    | UCH   | appliedenergistics2               | rv5-stable-11            | appliedenergistics2-rv5-stable-11.jar           | None                                     |
    | UCH   | baubles                           | 1.5.2                    | Baubles-1.12-1.5.2.jar                          | None                                     |
    | UCH   | biomesoplenty                     | 7.0.1.2384               | BiomesOPlenty-1.12.2-7.0.1.2384-universal.jar   | None                                     |
    | UCH   | botania                           | r1.10-354                | Botania+r1.10-354.jar                           | None                                     |
    | UCH   | buildcraftlib                     | 7.99.17                  | buildcraft-core-7.99.17.jar                     | None                                     |
    | UCH   | buildcraftcore                    | 7.99.17                  | buildcraft-core-7.99.17.jar                     | None                                     |
    | UCH   | buildcrafttransport               | 7.99.17                  | buildcraft-transport-7.99.17.jar                | None                                     |
    | UCH   | buildcraftcompat                  | 7.99.14                  | buildcraft-compat-7.99.14.jar                   | None                                     |
    | UCH   | ctm                               | MC1.12-0.3.0.15          | CTM-MC1.12-0.3.0.15.jar                         | None                                     |
    | UCH   | chisel                            | MC1.12.2-0.2.0.31        | Chisel-MC1.12.2-0.2.0.31.jar                    | None                                     |
    | UCH   | chiselsandbits                    | 14.17                    | chiselsandbits-14.17.jar                        | None                                     |
    | UCH   | codechickenlib                    | 3.1.9.344                | CodeChickenLib-1.12.2-3.1.9.344-universal.jar   | f1850c39b2516232a2108a7bd84d1cb5df93b261 |
    | UCEE  | redstoneflux                      | 2.0.2                    | RedstoneFlux-1.12-2.0.2.3-universal (2).jar     | 8a6abf2cb9e141b866580d369ba6548732eff25f |
    | UC    | cofhcore                          | 4.5.2                    | CoFHCore-1.12.2-4.5.2.19-universal.jar          | None                                     |
    | UC    | cofhworld                         | 1.2.0                    | CoFHWorld-1.12.2-1.2.0.5-universal.jar          | 8a6abf2cb9e141b866580d369ba6548732eff25f |
    | UC    | computercraft                     | 1.80pr1                  | ComputerCraft1.80pr1.jar                        | None                                     |
    | UC    | endercore                         | 1.12.2-0.5.31            | EnderCore-1.12.2-0.5.31.jar                     | None                                     |
    | UC    | jei                               | 4.9.2.196                | jei_1.12.2-4.9.2.196.jar                        | None                                     |
    | UC    | thermalfoundation                 | 2.5.0                    | ThermalFoundation-1.12.2-2.5.0.19-universal.jar | 8a6abf2cb9e141b866580d369ba6548732eff25f |
    | UC    | thermalexpansion                  | 5.5.0                    | ThermalExpansion-1.12.2-5.5.0.29-universal.jar  | 8a6abf2cb9e141b866580d369ba6548732eff25f |
    | UC    | enderio                           | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderiointegrationtic             | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderiobase                       | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderioconduits                   | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderioconduitsappliedenergistics | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderioconduitsopencomputers      | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderioconduitsrefinedstorage     | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderiointegrationforestry        | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | mantle                            | 1.12-1.3.2.24            | Mantle-1.12-1.3.2.24.jar                        | None                                     |
    | UC    | tconstruct                        | 1.12.2-2.10.1.87         | TConstruct-1.12.2-2.10.1.87.jar                 | None                                     |
    | UC    | enderiointegrationticlate         | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderiomachines                   | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | enderiopowertools                 | 5.0.26                   | EnderIO-1.12.2-5.0.26.jar                       | None                                     |
    | UC    | extrautils2                       | 1.0                      | extrautils2-1.12-1.7.6.jar                      | None                                     |
    | UC    | fastleafdecay                     | v14                      | FastLeafDecay-v14.jar                           | None                                     |
    | UC    | gravestone                        | 1.10.1                   | gravestone-1.10.1.jar                           | None                                     |
    | UC    | ichunutil                         | 7.1.4                    | iChunUtil-1.12.2-7.1.4.jar                      | None                                     |
    | UC    | hats                              | 7.0.0                    | Hats-1.12.2-7.0.2.jar                           | None                                     |
    | UC    | waila                             | 1.8.26                   | Hwyla-1.8.26-B41_1.12.2.jar                     | None                                     |
    | UC    | inventorytweaks                   | 1.63+release.109.220f184 | InventoryTweaks-1.63.jar                        | 55d2cd4f5f0961410bf7b91ef6c6bf00a766dcbe |
    | UC    | ironchest                         | 1.12.2-7.0.40.824        | ironchest-1.12.2-7.0.40.824.jar                 | None                                     |
    | UC    | journeymap                        | 1.12.2-5.5.2             | journeymap-1.12.2-5.5.2.jar                     | None                                     |
    | UC    | natura                            | 1.12.2-4.3.2.49          | natura-1.12.2-4.3.2.49.jar                      | None                                     |
    | UC    | nei                               | 2.4.1                    | NotEnoughItems-1.12.2-2.4.1.233-universal.jar   | f1850c39b2516232a2108a7bd84d1cb5df93b261 |
    | UC    | randomthings                      | 4.1.7                    | RandomThings-MC1.12.2-4.1.7.jar                 | d72e0dd57935b3e9476212aea0c0df352dd76291 |
    | UC    | thermaldynamics                   | 2.5.1                    | ThermalDynamics-1.12.2-2.5.1.14-universal.jar   | 8a6abf2cb9e141b866580d369ba6548732eff25f |

    Loaded coremods (and transformers): 
Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)
  invtweaks.forge.asm.ContainerTransformer
EnderCorePlugin (EnderCore-1.12.2-0.5.31.jar)
  com.enderio.core.common.transform.EnderCoreTransformer
  com.enderio.core.common.transform.SimpleMixinPatcher
CTMCorePlugin (CTM-MC1.12-0.3.0.15.jar)
  team.chisel.ctm.client.asm.CTMTransformer
LoadingPlugin (RandomThings-MC1.12.2-4.1.7.jar)
  lumien.randomthings.asm.ClassTransformer
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 391.01' Renderer: 'GeForce GTX 1060 6GB/PCIe/SSE2'
    AE2 Version: stable rv5-stable-11 for Forge 14.23.1.2554
    Pulsar/tconstruct loaded Pulses: 
        - TinkerCommons (Enabled/Forced)
        - TinkerWorld (Enabled/Not Forced)
        - TinkerTools (Enabled/Not Forced)
        - TinkerHarvestTools (Enabled/Forced)
        - TinkerMeleeWeapons (Enabled/Forced)
        - TinkerRangedWeapons (Enabled/Forced)
        - TinkerModifiers (Enabled/Forced)
        - TinkerSmeltery (Enabled/Not Forced)
        - TinkerGadgets (Enabled/Not Forced)
        - TinkerOredict (Enabled/Forced)
        - TinkerIntegration (Enabled/Forced)
        - TinkerFluids (Enabled/Forced)
        - TinkerMaterials (Enabled/Forced)
        - TinkerModelRegister (Enabled/Forced)
        - chiselIntegration (Enabled/Not Forced)
        - chiselsandbitsIntegration (Enabled/Not Forced)
        - wailaIntegration (Enabled/Not Forced)

    Pulsar/natura loaded Pulses: 
        - NaturaCommons (Enabled/Forced)
        - NaturaOverworld (Enabled/Not Forced)
        - NaturaNether (Enabled/Not Forced)
        - NaturaDecorative (Enabled/Not Forced)
        - NaturaTools (Enabled/Not Forced)
        - NaturaEntities (Enabled/Not Forced)
        - NaturaOredict (Enabled/Forced)
        - NaturaWorld (Enabled/Not Forced)
 

 

 

 

How can I make this modpack stop crashing due to redstone flux 2.0.2.

Link to comment
Share on other sites

Quote

RedstoneFlux has detected that the following OLD API classes from CoFHLib are being repacked!

RedstoneFlux is crashing because another mod has packed old API classes from CoFHLib into itself. This seems to be intended behaviour.

 

Further more, please read the crashlogs.
 

Quote

To prevent this crash, add "-Dcofh.rf.crashOnOldAPI=false" to your command line arguments.

 

Edited by Matryoshika

Also previously known as eAndPi.

"Pi, is there a station coming up where we can board your train of thought?" -Kronnn

Published Mods: Underworld

Handy links: Vic_'s Forge events Own WIP Tutorials.

Link to comment
Share on other sites

  • 1 year later...

Please don't Necro old threads, if you have an issue make your own.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • It worked thanks a lot ❤️ I'm gonna paste all of my code for anyone in the future looking to do capabilities package com.chickenwand3.rpgmod.core.capabilities.entity; import javax.annotation.Nullable; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; import net.minecraftforge.common.capabilities.ICapabilityProvider; public class CapabilityMobLevel{ public static Capability<MobLevel> MOB_LEVEL_CAPABILITY = CapabilityManager.get(new CapabilityToken<>() {}); public static void register() { CapabilityManager.INSTANCE.register(MobLevel.class); } } package com.chickenwand3.rpgmod.core.capabilities.entity; public class DefaultMobLevel implements MobLevel { public int mobLevel; public float mobMaxHealth; public float mobCurrentHealth; public boolean crazy; public boolean isCrazy() { return crazy; } public float getMaxHealth() { return mobMaxHealth; } public float getCurrentHealth() { return mobCurrentHealth; } } package com.chickenwand3.rpgmod.core.capabilities.entity; public interface MobLevel { } package com.chickenwand3.rpgmod.core.capabilities.entity; import com.chickenwand3.rpgmod.RPGMod; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Animal; import net.minecraft.world.entity.monster.Zombie; import net.minecraft.world.item.enchantment.Enchantments; import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; import net.minecraftforge.event.AttachCapabilitiesEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = RPGMod.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class MobLevelEventHandler { @SubscribeEvent public static void onAttachCapabilitiesEvent(AttachCapabilitiesEvent<Entity> event) { if (event.getObject() instanceof Mob && !event.getObject().getCommandSenderWorld().isClientSide) { MobLevelProvider providerMobLevel = new MobLevelProvider(); event.addCapability(new ResourceLocation(RPGMod.MODID, "moblevel"), providerMobLevel); event.addListener(providerMobLevel::invalidate); } } @SubscribeEvent public void registerCaps(RegisterCapabilitiesEvent event) { event.register(MobLevel.class); } @SubscribeEvent public static void OnSpawn(final EntityJoinWorldEvent event) { if (event.getEntity()instanceof Mob target && !event.getWorld().isClientSide) { target.getCapability(CapabilityMobLevel.MOB_LEVEL_CAPABILITY).ifPresent(mobLevel -> { DefaultMobLevel actualMobLevel = (DefaultMobLevel) mobLevel; if (actualMobLevel.mobLevel < 1) { actualMobLevel.mobLevel = (randomizeMobLevel()); } if (superCrazy(actualMobLevel.mobLevel)) { actualMobLevel.crazy = true; } if (actualMobLevel.crazy) { if (!target.getMainHandItem().isEmpty()) { target.getMainHandItem().enchant(Enchantments.FIRE_ASPECT, 1); } if (event.getEntity()instanceof Zombie zombie) { zombie.getAttribute(Attributes.SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(0.99D); } System.out.println("Super Crazy " + target.getName() + " has spawned!"); } actualMobLevel.mobMaxHealth = (target.getMaxHealth() * actualMobLevel.mobLevel * 2); actualMobLevel.mobCurrentHealth = actualMobLevel.mobMaxHealth; target.getAttribute(Attributes.MOVEMENT_SPEED) .setBaseValue(target.getAttributeValue(Attributes.MOVEMENT_SPEED) * (1 + (actualMobLevel.mobLevel - 1.0) / 10.0)); if (target.getAttribute(Attributes.ATTACK_DAMAGE) != null) { target.getAttribute(Attributes.ATTACK_DAMAGE) .setBaseValue(target.getAttributeValue(Attributes.ATTACK_DAMAGE) * (1 + (actualMobLevel.mobLevel - 1.0) / 2.0)); } }); } } private static int randomizeMobLevel() { boolean roll = true; int level = 1; while (roll) { if (Math.random() > .5) { level += 1; roll = true; } else { roll = false; } } return level; } private static boolean superCrazy(int level) { boolean result = false; if (level >= 5) { if (Math.random() < .25) { result = true; } else result = false; } return result; } } package com.chickenwand3.rpgmod.core.capabilities.entity; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import net.minecraftforge.common.util.LazyOptional; import javax.annotation.Nonnull; import javax.annotation.Nullable; public class MobLevelProvider implements ICapabilitySerializable<CompoundTag> { private final DefaultMobLevel mobLevel = new DefaultMobLevel(); private final LazyOptional<MobLevel> mobLevelOptional = LazyOptional.of(() -> mobLevel); public void invalidate() { mobLevelOptional.invalidate(); } @Nonnull @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { return mobLevelOptional.cast(); } @Override public CompoundTag serializeNBT() { System.out.println("It serialized"); if (CapabilityMobLevel.MOB_LEVEL_CAPABILITY == null) { System.out.println("It made a new compound"); return new CompoundTag(); } else { System.out.println("It serialized the values"); CompoundTag compoundNBT = new CompoundTag(); compoundNBT.putInt("mobLevel", mobLevel.mobLevel); compoundNBT.putFloat("mobCurrentHealth", mobLevel.mobCurrentHealth); compoundNBT.putFloat("mobMaxHealth", mobLevel.mobMaxHealth); compoundNBT.putBoolean("crazy", mobLevel.crazy); return compoundNBT; } } @Override public void deserializeNBT(CompoundTag nbt) { System.out.println("It deserialized"); if (CapabilityMobLevel.MOB_LEVEL_CAPABILITY != null) { System.out.println("It deserialized the values"); mobLevel.mobLevel = (nbt.getInt("mobLevel")); float mobCurrentHealth = nbt.getFloat("mobCurrentHealth"); mobLevel.mobCurrentHealth = (mobCurrentHealth); float mobMaxHealth = nbt.getFloat("mobMaxHealth"); mobLevel.mobMaxHealth = (mobMaxHealth); boolean crazy = nbt.getBoolean("crazy"); mobLevel.crazy = (crazy); } } }  
    • Just uploaded the correct installer from win machine to ubuntu via winscp. Sorry, didn't check the checksum. Very strange behavior :( Thank you!
    • I just tried it with both 36.2.0 and 36.2.19 using wget and the direct downloads. Both worked fine for me, giving me the correct MD5 sum. This is something on your machine.
    • And it's very strange, that if I try to download several times, this md5sum stays the same (6ecbb611d38ecd2c7bed8e1900e5dfc7).  
    • Wow! md5sum forge-1.16.5-36.2.0-installer.jar 6ecbb611d38ecd2c7bed8e1900e5dfc7  forge-1.16.5-36.2.0-installer.jar which doesn't align with original f2e0b8b9c7634fc854ce566f392dcded *forge-1.16.5-36.2.0-installer.jar and which is in my win download... Can you suggest what to use instead of wget?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.