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

[1.16.3] Dedicated Server Crash on Start


jstN0body
 Share

Recommended Posts

I can't run my mod on a dedicated server because of this? Is there any way to fix this?

java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/entity/PlayerRenderer for invalid dist DEDICATED_SERVER
        at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:71) ~[forge.jar:34.1] {}
        at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:85) ~[modlauncher-7.0.1.jar:?] {}
        at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:119) ~[modlauncher-7.0.1.jar:?] {}
        at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:256) ~[modlauncher-7.0.1.jar:?] {}
        at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:135) ~[modlauncher-7.0.1.jar:?] {re:classloading}
        at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:97) ~[modlauncher-7.0.1.jar:?] {re:classloading}
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_271] {}
        at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_271] {}
        at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) ~[?:1.8.0_271] {}
        at java.lang.Class.getConstructor0(Unknown Source) ~[?:1.8.0_271] {}
        at java.lang.Class.getConstructor(Unknown Source) ~[?:1.8.0_271] {}
        at net.minecraftforge.eventbus.api.EventListenerHelper.computeListenerList(EventListenerHelper.java:96) ~[eventbus-3.0.3-service.jar:?] {}
        at net.minecraftforge.eventbus.api.EventListenerHelper.getListenerListInternal(EventListenerHelper.java:63) ~[eventbus-3.0.3-service.jar:?] {}
        at net.minecraftforge.eventbus.api.EventListenerHelper.getListenerList(EventListenerHelper.java:48) ~[eventbus-3.0.3-service.jar:?] {}
        at net.minecraftforge.eventbus.EventBus.addToListeners(EventBus.java:263) ~[eventbus-3.0.3-service.jar:?] {}
        at net.minecraftforge.eventbus.EventBus.register(EventBus.java:256) ~[eventbus-3.0.3-service.jar:?] {}
        at net.minecraftforge.eventbus.EventBus.registerListener(EventBus.java:150) ~[eventbus-3.0.3-service.jar:?] {}
        at net.minecraftforge.eventbus.EventBus.lambda$null$6(EventBus.java:98) ~[eventbus-3.0.3-service.jar:?] {}
        at java.util.Optional.ifPresent(Unknown Source) ~[?:1.8.0_271] {}
        at net.minecraftforge.eventbus.EventBus.lambda$registerObject$7(EventBus.java:98) ~[eventbus-3.0.3-service.jar:?] {}
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:1.8.0_271] {}
        at java.util.stream.ReferencePipeline.forEach(Unknown Source) ~[?:1.8.0_271] {}
        at net.minecraftforge.eventbus.EventBus.registerObject(EventBus.java:94) ~[eventbus-3.0.3-service.jar:?] {}
        at net.minecraftforge.eventbus.EventBus.register(EventBus.java:120) ~[eventbus-3.0.3-service.jar:?] {}
        at com.github.jstN0body.shrinkmod.SizeMod.<init>(SizeMod.java:58) ~[?:1.0] {re:classloading}
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_271] {}
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_271] {}
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_271] {}
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_271] {}
        at java.lang.Class.newInstance(Unknown Source) ~[?:1.8.0_271] {}
        at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:81) ~[?:34.1] {re:classloading}
        at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$5(ModContainer.java:111) ~[?:?] {re:classloading}
        at java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source) [?:1.8.0_271] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(Unknown Source) [?:1.8.0_271] {}
        at java.util.concurrent.ForkJoinTask.doExec(Unknown Source) [?:1.8.0_271] {}
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source) [?:1.8.0_271] {}
        at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) [?:1.8.0_271] {}
        at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) [?:1.8.0_271] {}
[m[1;31m[19:05:24] [main/FATAL] [ne.mi.fm.ModLoader/LOADING]: Failed to complete lifecycle event CONSTRUCT, 1 errors found
[m[32m[19:05:24] [main/INFO] [STDOUT/]: [net.minecraft.crash.CrashReport:func_85057_a:196]: Negative index in crash report handler (16/18)
[m[1;31m[19:05:24] [main/FATAL] [ne.mi.fm.se.ServerModLoader/]: Crash report saved to .\crash-reports\crash-2020-11-09_19.05.24-fml.txt
[m---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 11/9/20 7:05 PM
Description: Mod loading error has occurred

java.lang.Exception: Mod Loading has failed
        at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:85) ~[?:?] {re:classloading}
        at net.minecraftforge.fml.server.ServerModLoader.load(ServerModLoader.java:51) ~[?:?] {re:classloading}
        at net.minecraft.server.Main.main(Main.java:96) ~[?:?] {re:classloading}
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271] {}
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] {}
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271] {}
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_271] {}
        at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:51) ~[forge.jar:34.1] {}
        at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-7.0.1.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-7.0.1.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-7.0.1.jar:?] {}
        at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-7.0.1.jar:?] {}
        at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-7.0.1.jar:?] {}
        at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63) [forge.jar:?] {}
        at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60) [forge.jar:?] {}
        at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) [forge.jar:?] {}

 

Link to comment
Share on other sites

8 minutes ago, poopoodice said:

Attempted to load class net/minecraft/client/renderer/entity/PlayerRenderer for invalid dist DEDICATED_SERVER

https://mcforge.readthedocs.io/en/latest/concepts/sides/

You should also post all your code

Currently reading the docs, here's the code of the class where I'm getting the error just in case:

@Mod(SizeMod.MODID)
public class SizeMod {
    // Directly reference a log4j logger.
    private static final Logger LOGGER = LogManager.getLogger();

    public static final String MODID = "sizemod";
    public static final String VERSION = "1.0.0";

    public static float sizePercentage = 1.0f;


    public SizeMod() {


        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);


        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
    }

    private void setup(final FMLCommonSetupEvent event)
    {
        // some preinit code

    }

    private void doClientStuff(final FMLClientSetupEvent event) {
        // do something that can only be done on the client

    }

    private void enqueueIMC(final InterModEnqueueEvent event)
    {
        // some example code to dispatch IMC to another mod

    }

    private void processIMC(final InterModProcessEvent event)
    {
        // some example code to receive and process InterModComms from other mods

    }

    // You can use SubscribeEvent and let the Event Bus discover methods to call
    @SubscribeEvent
    public void onServerStarting(FMLServerStartingEvent event) {
        ModCommands.register(event.getServer().getCommandManager().getDispatcher());
    }

    @SubscribeEvent
    public void onSizeChange(PlayerEvent.Size event) {

        if (event.getEntity() instanceof PlayerEntity) {
            EntitySize newSize;
            switch (event.getPose()) {
                case CROUCHING:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 1.5f * sizePercentage);
                    break;

                case SWIMMING:
                case FALL_FLYING:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 0.6f * sizePercentage);
                    break;

                case SLEEPING:
                    newSize = EntitySize.fixed(0.2f * sizePercentage, 0.2f * sizePercentage);
                    break;

                default:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 1.8f * sizePercentage);
            }
            event.setNewSize(newSize);
            event.setNewEyeHeight(newSize.height * 0.9f);
        }
    }

    @SubscribeEvent
    public void preRenderPlayer(RenderPlayerEvent.Pre event) {
        event.getMatrixStack().push();
        event.getMatrixStack().scale(sizePercentage, sizePercentage, sizePercentage);
    }

    @SubscribeEvent
    public void postRenderPlayer(RenderPlayerEvent.Post event) {
        event.getMatrixStack().pop();
    }

    @SubscribeEvent
    public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {
        if (!(event.getEntity() instanceof PlayerEntity)) return;

        SizeMod.sizePercentage -= 0.01;
        for (ServerPlayerEntity player : event.getPlayer().getServer().getPlayerList().getPlayers()) {
            player.setBoundingBox(AxisAlignedBB.func_241550_g_(0.6, 1.8, 0.6));
            player.sendStatusMessage(new TranslationTextComponent("Your size is now: " +
                    new DecimalFormat("0.00").format(SizeMod.sizePercentage*100) + "%"), true);
        }
    }

    int hunger;
    float saturation;
    @SubscribeEvent
    public void startPlayerEat(LivingEntityUseItemEvent.Start event) {
        if (event.getItem().isFood() && event.getEntity() instanceof PlayerEntity) {
            PlayerEntity player = (PlayerEntity) event.getEntity();
            FoodStats foodStats = player.getFoodStats();
            hunger = foodStats.getFoodLevel();
            saturation = foodStats.getSaturationLevel();
        }
    }

    @SubscribeEvent
    public void finishPlayerEat(LivingEntityUseItemEvent.Finish event) {
        if (event.getItem().isFood() && event.getEntity() instanceof PlayerEntity) {
            PlayerEntity player = (PlayerEntity) event.getEntity();
            FoodStats foodStats = player.getFoodStats();
            hunger = foodStats.getFoodLevel() - hunger;
            saturation = foodStats.getSaturationLevel() - saturation;
            hunger *= (1 - sizePercentage);
            saturation *= (1 - sizePercentage);
            foodStats.addStats(Math.round(hunger), saturation);
        }
    }

    // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
    // Event bus for receiving Registry Events)
    @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
    public static class RegistryEvents {
        @SubscribeEvent
        public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
            // register a new block here

        }
    }
}

 

Link to comment
Share on other sites

@Mod(SizeMod.MODID)
public class SizeMod {
    // Directly reference a log4j logger.
    private static final Logger LOGGER = LogManager.getLogger();

    public static final String MODID = "sizemod";
    public static final String VERSION = "1.1.2";

    public static float sizePercentage = 1.0f;


    public SizeMod() {

        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, () -> Pair.of(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true));

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);
    }

    private void setup(final FMLCommonSetupEvent event)
    {
        // some preinit code
    }

    private void doClientStuff(final FMLClientSetupEvent event) {
        // do something that can only be done on the client

    }

    private void enqueueIMC(final InterModEnqueueEvent event)
    {
        // some example code to dispatch IMC to another mod
    }

    private void processIMC(final InterModProcessEvent event)
    {
        // some example code to receive and process InterModComms from other mods
    }


    @SubscribeEvent
    public void onServerStarting(FMLServerStartingEvent event) {
        ModCommands.register(event.getServer().getCommandManager().getDispatcher());
    }


    @SubscribeEvent
    public void onSizeChange(PlayerEvent.Size event) {

        if (event.getEntity() instanceof PlayerEntity) {
            EntitySize newSize;
            switch (event.getPose()) {
                case CROUCHING:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 1.5f * sizePercentage);
                    break;

                case SWIMMING:
                case FALL_FLYING:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 0.6f * sizePercentage);
                    break;

                case SLEEPING:
                    newSize = EntitySize.fixed(0.2f * sizePercentage, 0.2f * sizePercentage);
                    break;

                default:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 1.8f * sizePercentage);
            }
            event.setNewSize(newSize);
            event.setNewEyeHeight(newSize.height * 0.9f);
        }
    }

    @OnlyIn(Dist.CLIENT)
    @SubscribeEvent
    public void preRenderPlayer(RenderPlayerEvent.Pre event) {
        event.getMatrixStack().push();
        event.getMatrixStack().scale(sizePercentage, sizePercentage, sizePercentage);
    }

    @OnlyIn(Dist.CLIENT)
    @SubscribeEvent
    public void postRenderPlayer(RenderPlayerEvent.Post event) {
        event.getMatrixStack().pop();
    }


    @SubscribeEvent
    public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {
        if (!(event.getEntity() instanceof PlayerEntity)) return;

        SizeMod.sizePercentage -= 0.01;
        for (ServerPlayerEntity player : event.getPlayer().getServer().getPlayerList().getPlayers()) {
            player.setBoundingBox(AxisAlignedBB.func_241550_g_(0.6, 1.8, 0.6));
            player.sendStatusMessage(new TranslationTextComponent("Your size is now: " +
                    new DecimalFormat("0.00").format(SizeMod.sizePercentage*100) + "%"), true);
        }
    }

    int hunger;
    float saturation;
    @SubscribeEvent
    public void startPlayerEat(LivingEntityUseItemEvent.Start event) {
        if (event.getItem().isFood() && event.getEntity() instanceof PlayerEntity) {
            PlayerEntity player = (PlayerEntity) event.getEntity();
            FoodStats foodStats = player.getFoodStats();
            hunger = foodStats.getFoodLevel();
            saturation = foodStats.getSaturationLevel();
        }
    }

    @SubscribeEvent
    public void finishPlayerEat(LivingEntityUseItemEvent.Finish event) {
        if (event.getItem().isFood() && event.getEntity() instanceof PlayerEntity) {
            PlayerEntity player = (PlayerEntity) event.getEntity();
            FoodStats foodStats = player.getFoodStats();
            hunger = foodStats.getFoodLevel() - hunger;
            saturation = foodStats.getSaturationLevel() - saturation;
            hunger *= (1 - sizePercentage);
            saturation *= (1 - sizePercentage);
            foodStats.addStats(Math.round(hunger), saturation);
        }
    }

    // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
    // Event bus for receiving Registry Events)
    @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
    public static class RegistryEvents {
        @SubscribeEvent
        public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
            // register a new block here

        }
    }
}

 

Link to comment
Share on other sites

By the way:

This:

On 11/9/2020 at 6:36 PM, jstN0body said:

        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

And this:

Quote

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);

Do the exact same thing, just in a different way. @EventBusSubscriber also does this. Th only difference is that there are two different busses (the mod bus and the forge bus) and one of them is for FML events ("life cycle events" which are on the mod event bus) and the rest are for game events (the forge event bus). You should use two different classes for the two different types of events, separating out all the client stuff to another third (and possibly fourth) class.

 

And personally I'd use the @EventBusSubscriber annotation, because then it's very easy to tell what bus a given set of events is for.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Howdy

 

You might get some inspiration from this class, it shows the method I've used to make the example mod work with Dedicated Server:

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/MinecraftByExample.java

 

The key bits are:

 

    
@Mod(MinecraftByExample.MODID)
public class MinecraftByExample {

  public MinecraftByExample() {
	// We need to split the registration of events into:
    // 1) "Common" events that are executed on a dedicated server and also on an integrated client + server installation
    // 2) "Client only" events that are not executed on a dedicated server.
    // If you aren't careful to split these into two parts, your mod will crash when installed on a dedicated server
    // It doesn't matter if your client-only code is never actually called; simply referencing the class is often enough to
    //   cause a crash.

    registerCommonEvents();
    DistExecutor.runWhenOn(Dist.CLIENT, () -> MinecraftByExample::registerClientOnlyEvents);
  }
}
  public static void registerCommonEvents() {
    MOD_EVENT_BUS.register(minecraftbyexample.mbe01_block_simple.StartupCommon.class);
  }

  public static void registerClientOnlyEvents() {
    MOD_EVENT_BUS.register(minecraftbyexample.mbe01_block_simple.StartupClientOnly.class);
  }


public class StartupCommon
{
  public static BlockSimple blockSimple;  // this holds the unique instance of your block
  public static BlockItem itemBlockSimple;  // this holds the unique instance of the ItemBlock corresponding to your block

  @SubscribeEvent
  public static void onBlocksRegistration(final RegistryEvent.Register<Block> blockRegisterEvent) {
    blockSimple = (BlockSimple)(new BlockSimple().setRegistryName("minecraftbyexample", "mbe01_block_simple_registry_name"));
    blockRegisterEvent.getRegistry().register(blockSimple);
  }
}
    
public class StartupClientOnly
{
  /**
   * Tell the renderer this is a solid block
   * @param event
   */
  @SubscribeEvent
  public static void onClientSetupEvent(FMLClientSetupEvent event) {
    RenderTypeLookup.setRenderLayer(StartupCommon.blockSimple, RenderType.getSolid());
  }
}

 

Link to comment
Share on other sites

Ok, I moved the render events to a class called Render, but I still have the same problem where I shrink for a split second and go back to normal. It works fine singleplayer, just not on a server. I can however, change my size in singleplayer and then connect to the server and remain that same size. Any ideas on what's happening?

@Mod(SizeMod.MODID)
public class SizeMod {
    // Directly reference a log4j logger.
    private static final Logger LOGGER = LogManager.getLogger();

    public static final String MODID = "sizemod";
    public static final String VERSION = "1.1.2";

    public static float sizePercentage = 1.0f;


    public SizeMod() {

        // Register the setup method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
        // Register the enqueueIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC);
        // Register the processIMC method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC);
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, () -> Pair.of(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true));

        DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> Render::new);

        MinecraftForge.EVENT_BUS.register(this);
    }

    private void setup(final FMLCommonSetupEvent event)
    {
        // some preinit code
    }

    private void doClientStuff(final FMLClientSetupEvent event) {

    }

    private void enqueueIMC(final InterModEnqueueEvent event)
    {
        // some example code to dispatch IMC to another mod
    }

    private void processIMC(final InterModProcessEvent event)
    {
        // some example code to receive and process InterModComms from other mods
    }


    @SubscribeEvent
    public void onServerStarting(FMLServerStartingEvent event) {
        ModCommands.register(event.getServer().getCommandManager().getDispatcher());
    }

    @SubscribeEvent
    public void onSizeChange(PlayerEvent.Size event) {

        if (event.getEntity() instanceof PlayerEntity) {
            EntitySize newSize;
            switch (event.getPose()) {
                case CROUCHING:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 1.5f * sizePercentage);
                    break;

                case SWIMMING:
                case FALL_FLYING:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 0.6f * sizePercentage);
                    break;

                case SLEEPING:
                    newSize = EntitySize.fixed(0.2f * sizePercentage, 0.2f * sizePercentage);
                    break;

                default:
                    newSize = EntitySize.fixed(0.6f * sizePercentage, 1.8f * sizePercentage);
            }
            event.setNewSize(newSize);
            event.setNewEyeHeight(newSize.height * 0.9f);
        }
    }


    @SubscribeEvent
    public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {
        if (!(event.getEntity() instanceof PlayerEntity)) return;

        SizeMod.sizePercentage -= 0.01;
        for (ServerPlayerEntity player : event.getPlayer().getServer().getPlayerList().getPlayers()) {
            player.setBoundingBox(AxisAlignedBB.func_241550_g_(0.6, 1.8, 0.6));
            player.sendStatusMessage(new TranslationTextComponent("Your size is now: " +
                    new DecimalFormat("0.00").format(SizeMod.sizePercentage*100) + "%"), true);
        }
    }

    int hunger;
    float saturation;
    @SubscribeEvent
    public void startPlayerEat(LivingEntityUseItemEvent.Start event) {
        if (event.getItem().isFood() && event.getEntity() instanceof PlayerEntity) {
            PlayerEntity player = (PlayerEntity) event.getEntity();
            FoodStats foodStats = player.getFoodStats();
            hunger = foodStats.getFoodLevel();
            saturation = foodStats.getSaturationLevel();
        }
    }

    @SubscribeEvent
    public void finishPlayerEat(LivingEntityUseItemEvent.Finish event) {
        if (event.getItem().isFood() && event.getEntity() instanceof PlayerEntity) {
            PlayerEntity player = (PlayerEntity) event.getEntity();
            FoodStats foodStats = player.getFoodStats();
            hunger = foodStats.getFoodLevel() - hunger;
            saturation = foodStats.getSaturationLevel() - saturation;
            hunger *= (1 - sizePercentage);
            saturation *= (1 - sizePercentage);
            foodStats.addStats(Math.round(hunger), saturation);
        }
    }

    // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD
    // Event bus for receiving Registry Events)
    @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
    public static class RegistryEvents {
        @SubscribeEvent
        public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) {
            // register a new block here

        }
    }
}
public class Render {

    public Render() {
        MinecraftForge.EVENT_BUS.register(this);
    }

    @SubscribeEvent
    public void preRenderPlayer(RenderPlayerEvent.Pre event) {
        event.getMatrixStack().push();
        event.getMatrixStack().scale(SizeMod.sizePercentage, SizeMod.sizePercentage, SizeMod.sizePercentage);
    }

    @SubscribeEvent
    public void postRenderPlayer(RenderPlayerEvent.Post event) {
        event.getMatrixStack().pop();
    }
}

 

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.

Guest
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • WorldGen you ask? I'd have examples for Decorations, BiomeHandlers, and Features as well. You can refer to post 3 in this thread for some input.
    • When i keep playing for a while the game begins to act strangely, similarly of when the tick speed is too high, later the game crashes. i tried already to identify the mod that causes this, but i can't. If someone can help me, it would be great. Crash report: ---- Minecraft Crash Report ---- // Oops. Time: 16/10/21 09:55 Description: Ticking entity java.lang.NullPointerException: Ticking entity A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace:     at net.minecraft.world.level.Level.m_46653_(Level.java:491) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B} -- Entity being ticked -- Details:     Entity Type: minecraft:player (net.minecraft.server.level.ServerPlayer)     Entity ID: 9029     Entity Name: Darth_Bicho     Entity's Exact location: 1203.79, 50.00, 94.06     Entity's Block location: World: (1203,50,94), Section: (at 3,2,14 in 75,3,5; chunk contains blocks 1200,0,80 to 1215,255,95), Region: (2,0; contains chunks 64,0 to 95,31, blocks 1024,0,0 to 1535,255,511)     Entity's Momentum: 0.00, -0.08, 0.00     Entity's Passengers: []     Entity's Vehicle: null Stacktrace:     at net.minecraft.world.level.Level.m_46653_(Level.java:491) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.server.level.ServerLevel.m_143264_(ServerLevel.java:384) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.world.level.entity.EntityTickList.m_156910_(SourceFile:54) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading}     at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:365) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:882) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:818) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:118) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,xf:OptiFine:default}     at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:683) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at java.lang.Thread.run(Thread.java:831) [?:?] {} -- Affected level -- Details:     All players: 1 total; [ServerPlayer['Darth_Bicho'/9029, l='ServerLevel[New World]', x=1203.79, y=50.00, z=94.06]]     Chunk stats: 17083     Level dimension: minecraft:overworld     Level spawn location: World: (193,63,88), Section: (at 1,15,8 in 12,3,5; chunk contains blocks 192,0,80 to 207,255,95), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)     Level time: 72768 game time, 92058 day time     Level name: New World     Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false     Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)     Known server brands: forge     Level was modded: true     Level storage version: 0x04ABD - Anvil -- System Details -- Details:     Minecraft Version: 1.17.1     Minecraft Version ID: 1.17.1     Operating System: Windows 8.1 (amd64) version 6.3     Java Version: 16.0.1, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 1451870312 bytes (1384 MiB) / 3120562176 bytes (2976 MiB) up to 3120562176 bytes (2976 MiB)     CPUs: 2     Processor Vendor: GenuineIntel     Processor Name: Intel(R) Celeron(R) CPU  N2840  @ 2.16GHz     Identifier: Intel64 Family 6 Model 55 Stepping 8     Microarchitecture: Silvermont     Frequency (GHz): 2,17     Number of physical packages: 1     Number of physical CPUs: 2     Number of logical CPUs: 2     Graphics card #0 name: Intel(R) HD Graphics     Graphics card #0 vendor: Intel Corporation (0x8086)     Graphics card #0 VRAM (MB): 2054,68     Graphics card #0 deviceId: 0x0f31     Graphics card #0 versionInfo: DriverVersion=10.18.10.4276     Memory slot #0 capacity (MB): 4096,00     Memory slot #0 clockSpeed (GHz): 1,33     Memory slot #0 type: Unknown     Virtual memory max (MB): 9101,36     Virtual memory used (MB): 6108,28     Swap memory total (MB): 5120,00     Swap memory used (MB): 1750,16     JVM Flags: 10 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmn128M -Xmx2957M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Player Count: 1 / 8; [ServerPlayer['Darth_Bicho'/9029, l='ServerLevel[New World]', x=1203.79, y=50.00, z=94.06]]     Data Packs: vanilla, mod:extraarmor (incompatible), mod:dungeonsmod, mod:jei (incompatible), mod:prefab (incompatible), mod:doggytalents (incompatible), mod:mcwwindows (incompatible), mod:wonderful_enchantments (incompatible), mod:reap (incompatible), mod:jrftl (incompatible), mod:journeymap (incompatible), mod:comforts, mod:travelersbackpack (incompatible), mod:naturescompass (incompatible), mod:libx, mod:dungeoncrawl (incompatible), mod:toolleveling (incompatible), mod:guardvillagers (incompatible), mod:mcwdoors (incompatible), mod:copperequipment (incompatible), mod:simpleores, mod:dash (incompatible), mod:ironchest (incompatible), mod:dicemcta (incompatible), mod:silentlib, mod:morevanillalib, mod:enchantedgoldenapplecrafting (incompatible), mod:jade, mod:forge, mod:ironfurnaces (incompatible), mod:simplecorelib, mod:mcwtrpdoors (incompatible), mod:xercamod (incompatible), mod:majrusz_library (incompatible), mod:golems (incompatible), mod:easy_villagers (incompatible), mod:dimdungeons (incompatible), mod:curios, mod:gravestone (incompatible), mod:collective, mod:randomdecorativethings, mod:villagertools (incompatible), mod:vanillahammers, mod:elevatorid (incompatible), mod:inventoryhud (incompatible), mod:structurize (incompatible), mod:buildersaddition (incompatible), mod:worldedit (incompatible), mod:starterkit, mod:constructionwand (incompatible), mod:hunterillager (incompatible), mod:appleskin (incompatible), mod:aquaculture, mod:fallingtree (incompatible), mod:enchantwithmob (incompatible), mod:smallernetherportals, mod:scalinghealth (incompatible), mod:expanded_combat, mod:chiselsandbits (incompatible), mod:lootbagmod (incompatible), mod:snowballsfreezemobs     Type: Integrated Server (map_client.txt)     Is Modded: Definitely; Client brand changed to 'forge'     OptiFine Version: OptiFine_1.17.1_HD_U_H1_pre6     OptiFine Build: 20211008-115759     Render Distance Chunks: 2     Mipmaps: 4     Anisotropic Filtering: 1     Antialiasing: 0     Multitexture: false     Shaders: null     OpenGlVersion: 3.2.0 - Build 10.18.10.4276     OpenGlRenderer: Intel(R) HD Graphics     OpenGlVendor: Intel     CpuCount: 2     ModLauncher: 9.0.7+91+master.8569cdf     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:           mixin PLUGINSERVICE           eventbus PLUGINSERVICE           object_holder_definalize PLUGINSERVICE           runtime_enum_extender PLUGINSERVICE           capability_token_subclass PLUGINSERVICE           capability_inject_definalize PLUGINSERVICE           accesstransformer PLUGINSERVICE           runtimedistcleaner PLUGINSERVICE           mixin TRANSFORMATIONSERVICE           OptiFine TRANSFORMATIONSERVICE           fml TRANSFORMATIONSERVICE      FML Language Providers:          minecraft@1.0         javafml@null     Mod List:          ExtraArmor-1.17.1-1.13.1.jar                      |Extra Armor                   |extraarmor                    |1.17.1-1.13.1       |DONE      |Manifest: NOSIGNATURE         DungeonsMod-1.17.1-1.4.53.jar                     |Dungeons Mod                  |dungeonsmod                   |1.17.1-1.4.53       |DONE      |Manifest: NOSIGNATURE         jei-1.17.1-8.0.0.12.jar                           |Just Enough Items             |jei                           |8.0.0.12            |DONE      |Manifest: NOSIGNATURE         Prefab-Mod-1.17.1.jar                             |Prefab                        |prefab                        |1.7.1.1             |DONE      |Manifest: NOSIGNATURE         DoggyTalents-1.17.1-2.1.0.1.jar                   |Doggy Talents 2               |doggytalents                  |2.1.0.1             |DONE      |Manifest: NOSIGNATURE         mcw-windows-2.0.0-mc1.17.1.jar                    |Macaw's Windows               |mcwwindows                    |2.0.0               |DONE      |Manifest: NOSIGNATURE         wonderful-enchantments-1.17.1-1.5.2.jar           |Wonderful Enchantments        |wonderful_enchantments        |1.5.2               |DONE      |Manifest: NOSIGNATURE         reap-1.17.1-1.0.0.jar                             |Reap Mod                      |reap                          |1.17.1-1.0.0        |DONE      |Manifest: NOSIGNATURE         JRFTL+[1.17.1]-1.2.jar                            |JRFTL                         |jrftl                         |1.2                 |DONE      |Manifest: NOSIGNATURE         journeymap-1.17.1-5.7.3rc3.jar                    |Journeymap                    |journeymap                    |5.7.3rc3            |DONE      |Manifest: NOSIGNATURE         comforts-forge-1.17.1-5.0.0.1.jar                 |Comforts                      |comforts                      |1.17.1-5.0.0.1      |DONE      |Manifest: NOSIGNATURE         TravelersBackpack-1.17.1-6.0.3.jar                |Traveler's Backpack           |travelersbackpack             |6.0.3               |DONE      |Manifest: NOSIGNATURE         NaturesCompass-1.17.1-1.9.2-forge.jar             |Nature's Compass              |naturescompass                |1.17.1-1.9.2-forge  |DONE      |Manifest: NOSIGNATURE         LibX-1.17.1-2.0.10.jar                            |LibX                          |libx                          |1.17.1-2.0.10       |DONE      |Manifest: NOSIGNATURE         DungeonCrawl-1.17.1-2.3.2.jar                     |Dungeon Crawl                 |dungeoncrawl                  |2.3.2               |DONE      |Manifest: NOSIGNATURE         toolleveling-1.17.1-1.2.8.jar                     |Tool Leveling                 |toolleveling                  |1.17.1 - 1.2.8      |DONE      |Manifest: NOSIGNATURE         guardvillagers-1.17.1.1.3.3 (1).jar               |Guard Villagers               |guardvillagers                |1.3.3               |DONE      |Manifest: NOSIGNATURE         mcw-doors-1.0.3-mc1.17.1.jar                      |Macaw's Doors                 |mcwdoors                      |1.0.3               |DONE      |Manifest: NOSIGNATURE         CopperEquipment-Forge1.17.1-0.1.jar               |Copper Equipment              |copperequipment               |0.1                 |DONE      |Manifest: NOSIGNATURE         SimpleOres2-1.17.1-3.0.1.4.jar                    |Simple Ores                   |simpleores                    |1.17.1-3.0.1.4      |DONE      |Manifest: NOSIGNATURE         dash-1.17.1-1.0.1.jar                             |Dash                          |dash                          |1.0.1               |DONE      |Manifest: NOSIGNATURE         ironchest-1.17.1-12.0.2.jar                       |Iron Chests                   |ironchest                     |1.17.1-12.0.2       |DONE      |Manifest: NOSIGNATURE         DiceMC-TieredArmor-1.17.1-1.1a.jar                |DiceMC Tiered Armor           |dicemcta                      |1.17.1-1.1a         |DONE      |Manifest: NOSIGNATURE         client-1.17.1-20210706.113038-srg.jar             |Minecraft                     |minecraft                     |1.17.1              |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         silent-lib-1.17.1-5.0.0.jar                       |Silent Lib                    |silentlib                     |5.0.0               |DONE      |Manifest: NOSIGNATURE         MoreVanillaLib-1.17.1-2.0.5.jar                   |MoreVanillaLib                |morevanillalib                |1.17.1-2.0.5        |DONE      |Manifest: NOSIGNATURE         1.17.1-enchantedgoldenapplecrafting-1.0.jar       |Enchanted Golden Apple Craftin|enchantedgoldenapplecrafting  |1.0                 |DONE      |Manifest: NOSIGNATURE         Jade-1.17.1-3.3.1.jar                             |Jade                          |jade                          |3.3.1               |DONE      |Manifest: NOSIGNATURE         forge-1.17.1-37.0.84-universal.jar                |Forge                         |forge                         |37.0.84             |DONE      |Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90         ironfurnaces-1.17.1-2.8.4.jar                     |Iron Furnaces                 |ironfurnaces                  |2.8.4               |DONE      |Manifest: NOSIGNATURE         SimpleCoreLib-1.17.1-3.0.4.0.jar                  |SimpleCoreLib                 |simplecorelib                 |1.17.1-3.0.4.0      |DONE      |Manifest: NOSIGNATURE         mcw-trapdoors-1.0.3-mc1.17.1.jar                  |Macaw's Trapdoors             |mcwtrpdoors                   |1.0.3               |DONE      |Manifest: NOSIGNATURE         xercamod-1.17.1-1.1.jar                           |Xerca Mod                     |xercamod                      |1.17.1-1.1          |DONE      |Manifest: NOSIGNATURE         majrusz-library-1.17.1-2.6.0.jar                  |Majrusz Library               |majrusz_library               |2.6.0               |DONE      |Manifest: NOSIGNATURE         extragolems-17.1.1.jar                            |Extra Golems                  |golems                        |17.1.1              |DONE      |Manifest: NOSIGNATURE         easy_villagers-1.17.1-1.0.5.jar                   |Easy Villagers                |easy_villagers                |1.17.1-1.0.4        |DONE      |Manifest: NOSIGNATURE         dimdungeons-1.13.1-forge-1.17.1.jar               |Dimensional Dungeons          |dimdungeons                   |1.13.1              |DONE      |Manifest: NOSIGNATURE         curios-forge-1.17.1-5.0.1.0.jar                   |Curios API                    |curios                        |1.17.1-5.0.1.0      |DONE      |Manifest: NOSIGNATURE         gravestone-1.17.1-1.0.4.jar                       |Gravestone Mod                |gravestone                    |1.17.1-1.0.4        |DONE      |Manifest: NOSIGNATURE         collective-1.17.1-2.64.jar                        |Collective                    |collective                    |2.64                |DONE      |Manifest: NOSIGNATURE         RandomDecorativeThings-1.17.1-0.1.2.jar           |Random Decorative Things      |randomdecorativethings        |0.1.2               |DONE      |Manifest: NOSIGNATURE         villagertools-1.17.1-1.0.1.jar                    |villagertools                 |villagertools                 |1.17.1-1.0.1        |DONE      |Manifest: 1f:47:ac:b1:61:82:96:b8:47:19:16:d2:61:81:11:60:3a:06:4b:61:31:56:7d:44:31:1e:0c:6f:22:5b:4c:ed         VanillaHammers-1.17.1-3.0.2.jar                   |Vanilla Hammers               |vanillahammers                |1.17.1-3.0.2        |DONE      |Manifest: NOSIGNATURE         elevatorid-1.17.1-1.8.1.jar                       |Elevator Mod                  |elevatorid                    |1.17.1-1.8.1        |DONE      |Manifest: NOSIGNATURE         InventoryHud_[1.17.1].forge-3.3.3.jar             |Inventory HUD+(Forge edition) |inventoryhud                  |3.3.3               |DONE      |Manifest: NOSIGNATURE         structurize-1.17.1-0.13.239-ALPHA.jar             |Structurize                   |structurize                   |1.17.1-0.13.239-ALPH|DONE      |Manifest: NOSIGNATURE         buildersaddition-1.17.1-20210810a.jar             |Builders Crafts & Addition    |buildersaddition              |1.17.1-20210810a    |DONE      |Manifest: NOSIGNATURE         worldedit-mod-7.2.6.jar                           |WorldEdit                     |worldedit                     |7.2.6+4b2d1e7       |DONE      |Manifest: NOSIGNATURE         starterkit_1.17.1-2.6.jar                         |Starter Kit                   |starterkit                    |2.6                 |DONE      |Manifest: NOSIGNATURE         constructionwand-1.17.1-2.3.jar                   |Construction Wand             |constructionwand              |1.17.1-2.3          |DONE      |Manifest: NOSIGNATURE         HunterIllager-1.17.1-2.4.0.jar                    |Hunter Illager                |hunterillager                 |1.17.1-2.4.0        |DONE      |Manifest: NOSIGNATURE         appleskin-forge-mc1.17.1-2.1.0.jar                |AppleSkin                     |appleskin                     |2.1.0               |DONE      |Manifest: NOSIGNATURE         Aquaculture-1.17.1-2.2.2.jar                      |Aquaculture 2                 |aquaculture                   |1.17.1-2.2.2        |DONE      |Manifest: NOSIGNATURE         Falling-Tree-Mod-Fabric-1.17.1.jar                |FallingTree                   |fallingtree                   |2.14.0              |DONE      |Manifest: 3c:8e:df:6c:df:a6:2a:9f:af:64:ea:04:9a:cf:65:92:3b:54:93:0e:96:50:b4:52:e1:13:42:18:2b:ae:40:29         enchantwithmob-1.17.1-2.5.1.jar                   |Enchant With Mob              |enchantwithmob                |1.17.1-2.5.1        |DONE      |Manifest: NOSIGNATURE         smallernetherportals_1.17.1-1.8.jar               |Smaller Nether Portals        |smallernetherportals          |1.8                 |DONE      |Manifest: NOSIGNATURE         ScalingHealth-1.17.1-5.0.4+4.jar                  |Scaling Health                |scalinghealth                 |5.0.4+4             |DONE      |Manifest: NOSIGNATURE         expanded_combat-2.3.0-1.17.1.jar                  |Expanded Combat               |expanded_combat               |2.3.0               |DONE      |Manifest: NOSIGNATURE         chiselsandbits-1.1.6-RELEASE-universal.jar        |Chisels & bits                |chiselsandbits                |1.1.6-RELEASE       |DONE      |Manifest: NOSIGNATURE         lootbagmod-1.17-3.0.0.jar                         |Loot Bag Mod                  |lootbagmod                    |1.17-3.0.0          |DONE      |Manifest: NOSIGNATURE         snowballsfreezemobs_1.17.1-1.5.jar                |Snowballs Freeze Mobs         |snowballsfreezemobs           |1.5                 |DONE      |Manifest: NOSIGNATURE     Crash Report UUID: 2c67d6ad-3d8a-4ade-8adf-3048ef40531b     FML: 37.0     Forge: net.minecraftforge:37.0.84
    • Good evening, a bit more progress and inherited info. I finally managed to understand why I couldn't perfectly connect my registry's to the object.class. You guys were right all the way. It was all about basic understanding of Java, and to correctly use fields, constants, properties etc. It's just one of 6 code languages I'm script kiddying, so bare with me. It also made sense to understand, that my Fluid.class(not FluidBlock.class) was, from its logic, actually a "register".class just as my main register .class, and I could basically just have used all my fluid.class code inside the general registry as well. So it seems important you also give perfect label/naming/package structure to your mod, though I know from scripting with Papyrus, it isn't the worst thing to multithread. However, the FluidRegistry.class has the FluidBlock.class registered like that now:
    • Use the OF website to check if it's compatible with your Forge version. It's a compatibility issue that OF needs to fix, nothing to do with Forge.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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