Jump to content

WorldsEnder

Members
  • Posts

    153
  • Joined

  • Last visited

Everything posted by WorldsEnder

  1. Also agreed. I'm not suggesting you should answer them, takes too much time and effort that you and the team can spend better. I'm suggesting a Board where the community can discuss them. Which can't be on the official board, since answering them there would bump the post and create noise, etc... I'm coming back to modding for a mod for 1.12 and basically when I google a problem, 3 of 10 spots are taken by locked minecraftforge topics, 3 more by stackoverflow question (also the wrong place to ask) and the rest by unhelpful planet minecraft discussions. Judging by the amount of questions of "where to ask these questions" I'm not alone on this one. SEO will just push other content out. Hence the solution with biggest benefit/effort I can think of: create a free-for-all Board with no official answers or expectation to answers from the Forge team, even if it results in unanswered questions, maybe they get answered months later by a rando and help one or two people in the future... If you decide to lock, I guess I'll just give up finding anything for the older versions, keep up the great support for the newer toys.
  2. The general support forums receives a lot of threads about old, officially unsupported versions of forge. The crux is though that these threads are picked up by google and search engines, leading to dead posts without solutions. The posts are locked, so even if I or someone else knows the solution to the reported problem, it's impossible to answer for future visitors. Consider moving the threads to another board, where while no official support is provided, perhaps other users can contribute to the solution. Would apply to Modder Support as well, generally coming to a locked thread from a google search is very discouraging. Precondition: the forum software supports moving Topics.
  3. I thought it would be straight forward to create a custom model format with item overrides, but for now, I don't see how. What I tried so far was the following: private static class ModelWrapper implements IRetexturableModel { //.... private final ItemOverrideList itemOverrides; @Override public Collection<ResourceLocation> getDependencies() { return itemOverrides.getOverrides().stream().map(override -> override.getLocation()).collect(Collectors.toList()); } } private static class BakedModelWrapper implements IBakedModel, IPerspectiveAwareModel { //.... private final ItemOverrideList itemOverrides; @Override public ItemOverrideList getOverrides() { return itemOverrides; } } apparently this is not enough. Currently, when one of the overrides is triggered, I'm presented with the MODEL_MISSING, instead of the item override I want. As an example, a model file would look like this (with easy to guess format): { version: 1, mesh: "mhfc:models/item/model_b_hunters_proud_idle.mcmd", textures: { "#weapontex": "mhfc:weapons/(B)huntersproud" }, overrides: [ { "predicate": { "pulling": 1 }, "model": "mhfc:item/b_hunter_proud_0.mcmdl" }, { "predicate": { "pulling": 1, "pull": 0.65 }, "model": "mhfc:item/b_hunter_proud_1.mcmdl" }, { "predicate": { "pulling": 1, "pull": 0.9 }, "model": "mhfc:item/b_hunter_proud_2.mcmdl" } ] } all the referenced files do exist but still, nothing is being displayed
  4. I want to spawn my custom mob in every village on the map, similar to how normal villagers are spawned. I have tried to look for a hook, but have not found a satisfying one. I am thinking about a quest-giver like entity with his own hut. Here's what I thought about: 1. Could you add your own StructureComponent to the village? This would be most favorable as I would also be able to spawn the house for the mob 2. If not 1, can you at least reliably react after a village has been populated to ship your own mob?
  5. I want to change a player's dimension but I also want to use a custom teleporter. So first I thought that I should use mcServer.getPlayerList().changePlayerDimension(this, dimensionIn, teleporter); but then I discovered that the class Entity has a method called "changeDimension(int)" which does a few more things, but does not allow for a custom teleporter (rather taking the dimension default). I wonder, what is the best course of action? 1) Use PlayerList#changePlayerDimension(EntityPlayerMP, int, Teleporter) PRO: allows for custom teleporter, CON: skips logic in EntityPlayer#changeDimension 2) Use Entity#changeDimension(int) followed by Teleporter#placeInPortal(EntityPlayer, double) PRO: doesn't skip logic, CON: a portal from the default teleporter, which can't be changed and is always a normal Teleporter, will be created 3)
  6. Can we see the exact console output in a pastebin? While I agree with diesieben that the code should run once, I suspect it might be because you use System.out.println instead of a logger that the message gets logged twice.
  7. Okay, got it, so I write a static method inside the SaveData public static ExampleWorldSavedData retrieveFor(World world){ ExampleWorldSavedData instance = (ExampleWorldSavedData) world.getPerWorldStorage().loadData(ExampleWorldSavedData.class, DATA_NAME); if (instance == null) { instance = new ExampleWorldSavedData(); storage.setData(DATA_NAME, instance); } } for now and use Capabilities in 1.10.2
  8. I am porting a mod from 1.7.10 to 1.9. Previously I used a self-written WorldChunkManager that used the perWorldStorage to have some data associated with the world it is used for. But now (thank god) chunk manager are a thing of the past, and it's solved via WorldProviders, ISaveHandlers and IChunkGenerators. What I did previously to access the data, was (CustomChunkManagerClass) server.getWorldChunkManager() and then work with the custom instance. The question I have is, what is the simplest method to attach data to the world (must only be done on the server, I allocate some "building slots" and keep track of them on the server, that the client doesn't need to know of) that fulfills the following: 1) I can reliably save and load the data when the world gets loaded/unloaded 2) I can access the data when I have WorldServer instance Is there some sort of Capability system as there is for Entities, Items, etc...?
  9. Okay, that should work if there's no cleaner method
  10. What, no, it doesn't. If you imagine the stages as a stack it is like this: ->constructed (FMLConstructionEvent) ->preInitialized (FMLPreInitializationEvent) ->serverRunning (FMLServerStartedEvent) --- <-serverRunning (FMLServerStoppedEvent) <- unknown event I'm searching for <- unknown even I'm searching for (maybe the same as one above)
  11. Similar to FMLServerStartedEvent vs FMLServerStoppedEvent I want to have a callback FMLConstructionEvent vs just before mods get deconstructed. Use case: I wrote a little API to help my mod transition between stages. So for example after FMLConstructionEvent I "enter" the "constructed" stage. Similar to services on Linux/Windows, some services may get started. For example, when FMLPreInitializationEvent gets fired, I enter "preInitialized" stage and my ItemRegistry-service gets started - and registers all the items. Now I thought that some services may wish for a graceful exit, so I need a hook when to exit "constructed" stage.
  12. Is it possible to receive a callback when the user clicked the "Quit Game" button in the main menu (or, additionally, exited the game in another way)? I'd like to write into a small file in that case and do some other little clean-ups. If it is only possible with newer versions of minecraft/forge, I'd love to know, as well
  13. Ah, I see, so it is indeed the lambda, not the other invocation. Well that should be an easy fix, then
  14. I use forge version 1.7.10-10.13.4.1492-1.7.10 and have the following code in my client proxy: @Override public void preInit() { IResourceManager resManager = Minecraft.getMinecraft().getResourceManager(); if (resManager instanceof IReloadableResourceManager) { IReloadableResourceManager registry = (IReloadableResourceManager) resManager; registry.registerReloadListener(this::reload); } else { MCAnm.logger() .warn("Couldn't register reload managers. Models will not be reloaded on switching resource pack"); } } Note that I use lambdas from java 8 but that isn't a problem. The problem is that when I run the mod in modded minecraft, the following stacktrace pops up: ---- Minecraft Crash Report ---- // Ouch. That hurt Time: 28.06.16 01:54 Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.AbstractMethodError at cpw.mods.fml.common.LoadController.transition(LoadController.java:163) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:559) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878) at net.minecraft.client.main.Main.main(SourceFile:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.AbstractMethodError at net.minecraft.client.resources.SimpleReloadableResourceManager.func_110542_a(SimpleReloadableResourceManager.java:130) at com.github.worldsender.mcanm.client.ClientProxy.preInit(ClientProxy.java:27) at com.github.worldsender.mcanm.MCAnm.preInit(MCAnm.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556) ... 10 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 152702168 bytes (145 MB) / 333340672 bytes (317 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1492 6 mods loaded, 6 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCH FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1492-1.7.10.jar) UCH Forge{10.13.4.1492} [Minecraft Forge] (forge-1.7.10-10.13.4.1492-1.7.10.jar) UCE mcanm{2.1.0.84-1.7.10} [Minecraft Animated] (mcanm-2.1.0.84-1.7.10.jar) UCH worldedit{6.1} [WorldEdit] (worldedit-forge-mc1.7.10-6.1.jar) This does _not_ happen when I run the mod via gradle runClient, _only_ when I run it with the actual minecraft client. Can someone explain this, or even propose a fix?
  15. My problem with mcmod.info and @Mod is that they are both non-binding, read, they could tell you everything or nothing. The mcmod.info could tell me the minecraft version, but doesn't tell me the forge version. Wheras the .pom generated by gradle->maven is a known and standardized model. At this point, I'm already commited to the installer, and I'd appreciate your okay/positive view on the coming pullrequest. There are a few more things that'd have to be added to the pom, e.g. repositories, but I'm certain I can resolve them. EDIT: I mean even gradle has full maven integration. EDIT2: To download the full jar of a mod to check compability is a huge transfer of data that could just aswell result in a failure. The pom is lightweight and enough to do the job
  16. It "should" be in the mod version, yes, but it's non-standard and there is no way to automate that. What I want to push forward is a mod installer that let's you drag mods from the forums, similarly to the eclipse market place installer, if you have seen that. Basically, one drags in a repository little json file and the installer resolves dependencies, the correct minecraft/forge versions and other mods. If I should try and submit a patch to ForgeGradle myself, tell me and I'll see what I can do. Currently, it's not easy to warn about an incompatible forge version and I know that users will complain even if it's all in plain sight.
  17. Currently the dependency file for a mod looks like this: <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <groupId>com.github.Guild-Hall</groupId> <artifactId>MHFC</artifactId> <version>master</version> <developers> <developer> <name></name> <email></email> </developer> </developers> <scm> <connection>scm:null</connection> <developerConnection>scm:null</developerConnection> </scm> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>com.github.WorldSEnder</groupId> <artifactId>MCAnm</artifactId> <version>v1.0</version> <scope>compile</scope> </dependency> </dependencies> </project> Note that while dependencies for compilation (aka other mods) are being added, there is no way to find out the forge version it was compiled against. Normally I'd have expected to find an entry with scope "provided" like <dependency> <groupId>net.minecraftforge</groupId> <artifactId>forge</artifactId> <version>1.8.8-11.15.0.1655</version> <scope>provided</scope> </dependency> And therelike for the other used Minecraft-provided libraries. This would make things easier for an automated version checker that can decide whether it's downloading the artifact for the correct minecraft-version solely based on the .pom
  18. I just updated to Forge for 1.8 and all the IModelCustom, CustomModelRegistry, etc... is completely gone. Did that move to another package like all the cpw stuff or is it really gone?
  19. I have the following classes: package mhfc.net.common.eventhandler.quests; import cpw.mods.fml.common.eventhandler.Event; public abstract class QuestGoalEventHandler<EventType extends Event> { NotifyableQuestGoal<EventType> questGoal; boolean stillActive; protected Class<EventType> eventType; public QuestGoalEventHandler(NotifyableQuestGoal<EventType> g, Class<EventType> t) { this.questGoal = g; stillActive = false; this.eventType = t; } public abstract <E extends EventType> void onEventCaught(E event); public void setActive(boolean active) { stillActive = active; } } package mhfc.net.common.eventhandler.quests; import net.minecraftforge.event.entity.living.LivingDeathEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class LivingDeathEventHandler extends QuestGoalEventHandler<LivingDeathEvent> { public LivingDeathEventHandler(NotifyableQuestGoal<LivingDeathEvent> g) { super(g, LivingDeathEvent.class); } @Override @SubscribeEvent public void onEventCaught(LivingDeathEvent event) { if (stillActive) questGoal.notifyOfEvent(event); } } At some point I call this piece of code: MinecraftForge.EVENT_BUS.register(new LivingDeathEventHandler(this)); . Now the following is inconsistent. When I execute and test the Mod in eclipse nothing special happens and everything runs smooth, the problem occurs after I built the mod and try it "in the wild": java.lang.ClassCastException: net.minecraftforge.client.event.RenderLivingEvent$Specials$Pre cannot be cast to net.minecraftforge.event.entity.living.LivingDeathEvent at mhfc.net.common.eventhandler.quests.LivingDeathEventHandler.onEventCaught(LivingDeathEventHandler.java:6) Full crash report can be found here: http://pastebin.com/8mBh7h9K I can fully understand WHY this happens in the wild, if you can't refrain to this: http://stackoverflow.com/questions/28388034/ Why does forge think it has to call LivingDeathEventHandler.onEventCaught() for net.minecraftforge.client.event.RenderLivingEvent$Specials$Pre? When I analyze the produced classes I see the @SubscribeEvent annotation only on the method "onEventCaught(LivingDeathEvent)", so I don't see why the method should be registered for any other event at all.
  20. You're gonna have problems with textures from other mods, anyway... unless you provide a solid concept what you wanna do when you encounter other mod's blocks (which you have no idea of) I don't think brainstorming will lead to anything. tl;dr: What is the whole idea behind the "duplicate world"?
  21. You understand that variable names like "p_92103_1_", "k", "l", etc. are as bad as it can get, right? Nobody should be confronted with such code to debug it... also I agree with diesieben, if you copy code, at least tell us before I read half of the code.
  22. Totally offtopic and why would I want to do that, anyway?
  23. Note to future readers: I gain access to the logger via @Mod.EventHandler public void preInit(FMLPreInitializationEvent pre) { logger = pre.getModLog(); } EDIT: I found this old thread but it is outdated and doesn't explain anything in the end. (How to use config/logging.properties, after all?)
  24. I know there is "org.apache.logging.log4j.Logger" that are being used throughout to print all kinds of messages. I want a call to logger.debug("Some awesome message"); to show up when I work in eclipse but not when the mod is deployed. How can I set the Level of Messages that are being print to the console to DEBUG?
  25. So basically isClientWorld() is just the most misleading name to give to a method that is supposed to return true for the server? kek
×
×
  • Create New...

Important Information

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