Jump to content

Keheck

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by Keheck

  1. I want to create a mod that adds mobs with wich you can fight other people (I call those mobs "Fighters"), like in Pokemon, with the difference that this mod uses mobs from the vanilla version and other mods that choose to add thier own fighters. Now, if I were to add a renderer, model and mob class that represents one mob that exists in vanilla, I don't know if I can run into issues like a lack of memory (especially if other mods implement my mod), so I wanted to use only one entity and renderer that represents all fighters, and when the mob get's spawned the renderer reads from that mob (like an ID or something) and pulls out the correct model and renders it. If that explanation was a bit confusing, here is a flowchart of how I want the render process to be.
  2. So I have to wait until someone makes an MCP name for that or I somehow make my own? (Also, what does "MCP" and "SRG" stand for?)
  3. I wanted to look into the workings of the models in Minecraft, but since the sources are missing or can't be loaded (idk), my IDE can only display the bytecode, wich causes the field and parameter names to have an autogenerated pattern like "p_XXXXX_X_" for parameters, where X is any single digit number. As you may guess, these names are not really helpful. So, why are chunks of the sources missing, and where can I get accurate sources to attach to the decompiled files? Because the provided sources on the Forge website don't help (yes, I checked if it's the correct version). Or maybe you know what each of these parameters represent: class EntityModel<T extends Entity> extends Model { public void render(T p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { } }
  4. So, what actions could you perform or should be performed on remote world (i.e. "slave" worlds)? Maybe graphics stuff that is independent of the logical server, since the remote world is on the logical client? I'm curious...
  5. Ah ok. I thought since folders coming in sequence in IntelliJ are seperated by a dot I could just name them "foo.bar" and it would be fine. Silly me... Thanks for your help it's working now.
  6. I uploaded it to my github repo here.
  7. I have opened a repository now. The current version is on the "WIP" branch. If you want to test the project yourself, however, it needs to be setup as if you just setup a clean project. I don't know how gradle behaves when you change systems like the IDE so I wanted to be sure. Oh, and here's the log.
  8. The model's still not showing. Still same error message Not that I expected much, the item itself was still being registered, just not the model
  9. I know, I said this: Show this. There: public class Items { public static final MobBallItem MOB_BALL = new MobBallItem(); } If you meant that...
  10. I don't know what is wrong with my code: My Item class: public class MobBallItem extends Item { public MobBallItem() { super(new Properties().maxStackSize(1)); setRegistryName(MobFighters.MODID, "mob_ball"); //MODID = "mobfighters" } } My Item registry: @Mod.EventBusSubscriber(modid = MobFighters.MODID, bus = Bus.MOD) //MODID = mobfighters public class Registry { @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> registry) { registry.getRegistry().register(Items.MOB_BALL); } } And the model path is: assets/mobfighters/models/item/mob_ball.json Maybe it's because I didn't register the model location. But the error message reads "...java.io.FileNotFoundException: mobfighters:models/item/mob_ball.json" I tried to register the model, but the documentation doesn't seem to be up-to-date, since it reads but the ModelLoader class doesn't contain the setCustomModelResourceLocation method anymore. I also skipped through a 20min long tutorial on items and nowhere does the guy register any models (or maybe I just missed it).
  11. For some reason, Forge doesn't register my item model. When it's "displayed" in the game, it shows the missing texture... texture. Here's the error message, if that helps The item constructor: public MobBallItem() { this.setMaxStackSize(1); this.setUnlocalizedName("mob_ball"); this.setRegistryName(new ResourceLocation(MobFighters.MODID, "mob_ball")); Items.ITEMS.add(this); } Model registry: @SubscribeEvent @SuppressWarnings("ConstantConditions") @SideOnly(Side.CLIENT) public static void registerModels(ModelRegistryEvent event) { for(Item item : ITEMS) //I have a static import for ITEMS { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } } Item registry: @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> registry) { registry.getRegistry().register(Items.MOB_BALL); MobFighters.getLogger().info("Registered Items!"); } Item model location: assets/<MODID>/models/items/mob_ball.json Yes, I completely checked if this path is right
  12. I'm trying to get the Forge 1.7.10 MDK working, but I keep getting an error. I've attached stack trace, info and debug (the latter two are incomplete due to console buffer size I think). How can this error I'm getting be fixed? debug.txt info.txt Stacktrace.txt
  13. Okay, wait does it have something to do with the property override?
  14. Are we talking about the same Minecraft/Forge version? I'm using 1.14.4... I only see "player.setActiveHand(hand)" that would maybe register an Items as being "is use"
  15. That's not my problem. The problem is, the method that also the bow uses is to slow for me. I want a method that fires 20 ticks/sec, not 10 ticks/sec. I can get the method to fire and also do what I want, but it's just too slow.
  16. I've only tried overriding the method so far. I'm very new to modding, so I don't know many ways of getting things to work in Forge. To test if the method gets called I used the logger of the mod to log a message
  17. For a mod that adds guns to Minecraft, I want a method to check if the player right-clicks (aka uses) the item, to which the response of the game is that the weapon is firing. I'm using the "onItemRightClick(World, PlayerEntity, Hand)" method, which seems to fire 10 times a second, which means it is fired every other tick. But I want a method that fires every tick, 20 times a second, 0.05s. I know that there is an "onUsingTick(ItemStack, LivingEntity, int)" method, but I can't seem to get it working, although it is "Called each tick while using the item". Is there a way I can get it to work? Update: I've looked for overrides of the method, but there don't seem to be any
  18. As you may know, you can inspect usages, declarations, etc. in IntelliJ when you LShift+Click them. I have this problem that for some files Gradle/IntelliJ opens the file that is in the cache (C:\Users\[user]\.gradle\caches\...). An example would be: The file to open: C:/[...]/1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3/forge-1.14.4-28.1.0_mapped_snapshot_20190719-1.14.3-sources.jar!/net/minecraft/item/ItemStack.java The file Gradle opens: C:/[...]/1.13.2-25.0.22_mapped_snapshot_20180921-1.13/forge-1.13.2-25.0.22_mapped_snapshot_20180921-1.13-sources.jar!/net/minecraft/item/ItemStack.java Note the difference when it comes to the Minecraft version. For some reason, Gradle opens the file from 1.13.2 rather than from 1.14.4, which is the version I'm writing the mod in. It works when I look for the class in the file navigator in the "External Libraries" tree. Is there an option where I can change the path that Gradle takes to open source files? The attached image may help to clarify my problem. The left one is the 1.13.2 and the right one the 1.14.4 file
  19. Hello, fellow modders! I noticed that a good chunk of the sources for Minecraft Forge 1.14.4 are not available. What I mean by that is that the IDE I'm using can only use the decompiled bytecode causing the classes to look confusing. The images I attached help clarify things. It isn't as big of a problem for me, but I'd still like to make the code clearer. This "bytecode problem" affects most of the classes form the net.minecraft package. The first image is with the attached sources, the second one without.
  20. And when I build the mod and run it on forge with the code that I wrote while having the dependency is not going to cause problems?
  21. Wouldn't the compiler throw out an error because the class doesn't exist?
×
×
  • Create New...

Important Information

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