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

Leaderboard

Popular Content

Showing content with the highest reputation since 06/26/21 in all areas

  1. BreakEvent is called before the block is removed. So you would have to cancel the event and then replace the block.
    1 point
  2. Well, my friend, it completely worked! Easy, brilliant and simple way to make this. I cannot confirm if the ores spawn only on the surface of lava pools or also floating inside them as all the pools I've found were 1 block deep. It's not exaactly what I envisioned, but for the cool, easy to implement idea, I thank you, and added you to the acknowledgements.
    1 point
  3. Unfortunately I'm also new to modding, so I'm not that familiar with the full code base. Maybe someone else'll know? I still definitely recommend looking into where in the original source the lava pools are spawned and seeing if there's anything you can hook into there, just in case.
    1 point
  4. I'm not on my dev machine so I can't check the code myself, but I'm fairly certain the bee nest generation is attached to and triggered by the tree generation itself. If you want to use that approach, you'll need to hook into the lava pool generation, which I suspect is pretty difficult. Alternatively, I took a peek at some world gen stuff, and have you considered making the valid replacement block be lava source blocks instead of stone? It has the small chance of completely filling an underground lava pool, but otherwise I think it might do what you need.
    1 point
  5. 'init' method still needs a @SubscribeEvent
    1 point
  6. init is never called, because you do not register it to the mod event bus.
    1 point
  7. This is your issue. This code runs on the server, hence you cannot do this here. You have to use DistExecutor for this. However you should probably really just store the RegistryKey in CubeStructure and not the World. Then you do not have this issue at all and you also don't run the risk of causing memory leaks.
    1 point
  8. did you use autoreglib?
    1 point
  9. well, it's not like I wrote the bot
    1 point
  10. There is a much better way, join the Forge discord and use forge-bot.
    1 point
  11. latest log: https://gist.github.com/TheSaikos/1d7fd1c203bcc716d00e65aa56ec87a3 debug log: https://gist.github.com/TheSaikos/5ed12891967473cf9bd9731de8711439 I played in my world with 170+ mods for over 2 months, everything worked fine. Overnight when i tried to load up the world it got stuck on the mentioned screen. My game didn't crash before or anything. Anytime i created a new world i couldn't rejoin it. I already did a clean reinstall and resetted all the config files and it still isn't working. When I removed mods one by one, it would work sometimes, but when I rejoin again it w
    1 point
  12. you also can try to use an AttributeModifier (Attributes#MOVEMENT_SPEED), use the ArmorItem as an example or try to manipulate the player's motion, but that's tricky
    1 point
  13. I would say don't do them at all. They are not used anywhere else but your TileEntity after it has already checked for a matching recipe. If they were programmed correctly, they would always succeed, because obviously the recipe would never have matched if one of them was not an input.
    1 point
  14. First you get the two inputs and the catalyst. You then pass these three stacks to the getResult method. The getResult method then does this: new RecipeWrapper(new InvWrapper(new Inventory(input1, input2, catalyst))) Instead, getResult could just get passed in the IItemHandler you already have (here) and use RecipeWrapper on that.
    1 point
  15. This is just gross, the following coremods are erroring: Performant snowrealmagic supplementaries defaultoptions ars_nouveau ftb ultimine Remove them
    1 point
  16. Yeah, either NBT or a capability should work.
    1 point
  17. You can't really have an instance field like extraArmor in item classes, since items are singleton and every stack will share the same item. This means that for example if one player uses the item and changes the extraArmor field, it will also change for all other players that also have that item.
    1 point
  18. Your serializer is looking for a JsonObject called "output" in the recipe. this key does not exist in your JSON file.
    1 point
  19. IRecipeSerializer is a registry entry. You must register it in the same way you do blocks and items.
    1 point
  20. Oh gosh looks like I tunnel visioned onto the model and layer themselves and it never clicked on me that it was the render event all along. Made a set to store all players that I've added the layer to, now it's smooth like butter. Thanks for the help dude, and also for the grain interaction thing. Scrap that, someone pointed out to me that the renderer is shared for all entities, so yeah, only once at startup.
    1 point
  21. Well, Minecraft runs on the JVM so in that sense, yes.
    1 point
  22. remove the parameters from the Mod.EventBusSubscriber annotation and this code line: MinecraftForge.EVENT_BUS.post(event);
    1 point
  23. you need to render the lines of the box, look at the StructureBlockTileEntityRenderer for an example but basically you render a box with WorldRenderer#renderLineBox
    1 point
  24. Solved: Thank you for your patient help. It works now and believe me, the satisfaction of having a diamond pop out of a grass block after hours of making stupid mistakes is way greater than the satisfaction of just finding a Diamond in survival . This is the final class for registry: package com.FenrisFox86.fenriscore.common.events; import ... @Mod.EventBusSubscriber(modid = FenrisCore.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class LootModifierEvents { @SubscribeEvent public static void registerModifierSerializers(@Nonnull final RegistryEvent.Register<G
    1 point
  25. You now register the class to the event bus (using @EventBusSubscriber) but made the method not static. If you register the class, the method must be static. If you register the instance, it must be non-static. Additionally, @EventBusSubscriber registers to the Forge event bus by default, registry events fire on the mod event bus. Check out the event documentation for more info.
    1 point
  26. Do not put a DeferredRegister and its entries in separate classes (mainly FABRICATOR_CONTROLLER_BLOCK_ITEM and ItemRegistry.ITEMS). Either move FABRICATOR_CONTROLLER_BLOCK_ITEM or make a secondary DeferredRegister for items in BlockRegistry. You have told your TileEntityType that no blocks are valid for it, hence it reports this fact. Pass the valid blocks to the of method.
    1 point
  27. You don't run mods. You put them in the mods folder.
    1 point
  28. The root cause seems to be an issue with "survive". Check if it is up to date, report to the mod author if you're already using the latest version.
    1 point
  29. Instant effects require you to call Effect#affectEntity instead of calling LivingEntity#addPotionEffect. See PotionEntity#func_213888_a for how splash potions do this.
    1 point
  30. Yes finally. I took some suggestions from here The libraries are now embedded and loaded on runtime. I used embed and works perfectly. This is the final configuration: buildscript { repositories { maven { url = 'https://maven.minecraftforge.net' } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.1.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply
    1 point
  31. Command blocks have a permission level of 2, not 4.
    1 point
  32. Why on earth do you keep calling random methods? Why are you calling Entity#getEntity? Why are you calling onKillCommand? Learn basic Java, instanceof and casting.
    1 point
  33. You have to use DamageSource#getEntity to get the entity doing the attack. Note that this can be null, if you take damage from something that is not an entity.
    1 point
  34. Similar thing: I get an error containing "java.lang.ArrayIndexOutOfBoundsException" in the attached file (The installer log) when trying to use the windows installer for 1.8.9 forge version #1902 I'd use the most recent version of Forge 1.8.9 (Version #2318) but OptiFine doesn't support it and there's no windows installer for that version Note: The installer doesn't create the version anyways so the error means no Forge 1.8.9 forge-1.8.9-11.15.1.1902-1.8.9-installer-win.exe.log
    1 point
  35. Is the method called at all? How did you register the event handler?
    1 point
  36. What does that have to do with the class you put it in? 🤔 Call LivingEntity#getItemStackFromSlot to get armor or other equipment. Then check if it is your armor items. This won't work, as this is a server side event. You have to specifically use the particle methods in ServerWorld that send pacekts if you want to spawn particles from the server.
    1 point
  37. Don't put it in your armor class, use a separate event handler. What do you mean by "add particles to this mob"?
    1 point
  38. No idea why you decided to use onArmorTick for that. Use LivingAttackEvent to detect when an entity is attacking a player.
    1 point
  39. How would I know? You have not explained what you were trying to do here. I mean... if the effect is going to last 2 minutes or whatever you don't have to add it every tick. In fact that will prevent some effects from working, because their timer is always reset.
    1 point
  40. Why did you add @OnlyIn to this method? Do not use @OnlyIn. Why are you calling hitByEntity here? It makes zero sense in this context and I don't think you know what this method actually does (the proper Mojang name for this method is skipAttackInteraction, the MCP name is terrible). Are you sure you want to add the effect again every single tick?
    1 point
  41. Some zip managers like to take control of the .jar file extension away from Java. Make sure you have Java installed and try running Jarfix once, then try the installer again.
    1 point
  42. Try installing to somewhere that OneDrive never had access to, it doesn't need to still be on the PC for its access rules to screw things up
    1 point
  43. The Forge Git repository only contains patches to the decompiled Minecraft source code. In very simplified terms this means "remove this line from this file" or "add this code here". It does not contain the decompiled game source code. When the Forge installer is built, these patch files are converted to binary patches to the compiled code, these binary patch files are then shipped with the installer. As such the installer again does not contain any Minecraft code. When you then run the installer it takes the vanilla Minecraft jar (or downloads it from Mojang's servers if you don't have i
    1 point
  44. You have to call either pickSprite or setSprite on your particle in your particle factory.
    1 point
  45. Some recent version seems to have changed the default way IntelliJ compiles Gradle project. It used to be that it still used the IntelliJ build system, which puts resources and classes in one folder. Now "Delegate to gradle" seems to be the default, and gradle puts resources and classes in two separate folders. Make sure to set IntelliJ to not delegate to Gradle (https://www.jetbrains.com/help/idea/work-with-gradle-projects.html#delegate_build_actions).
    1 point
  46. SORRY FOR NECROING AN OLD THREAD! If anyone wants examples of how to use DefaultVertexFormats.BLOCK look at net.minecraft.client.renderer.BlockFluidRenderer or If anyone wants examples of how to use DefaultVertexFormats.POSITION_TEX look at net.minecraft.client.renderer.ItemRenderer or RenderTileEntityAlchemicArray.java If anyone wants examples of how to use DefaultVertexFormats.POSITION_TEX_COLOR look at net.minecraft.client.renderer.RenderGlobal or ClientUtil.java Examples for everything except block are pretty easy to find with your IDE's search
    1 point
  47. I've figured out that Minecraft.getMinecraft().getIntegratedServer() works in singleplayer. Because I don't really intend for this to be a server mod, I think I'll just make it not work but not crash when attempting to execute a command on a server: MinecraftServer server = Minecraft.getMinecraft().getIntegratedServer(); if(server == null) { parent.parent.out.println("You cannot run vanilla commands on a server!"); } else { server.getCommandManager().executeCommand(parent, command); } Thanks anyways for the help, Choonster and diesieben!
    1 point


  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...

Important Information

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