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/14/21 in Posts

  1. Check if the RessourceLocation from the biome and the RegistryKey#location are equal
    1 point
  2. I've submitted a fix to Forge: https://github.com/MinecraftForge/MinecraftForge/pull/7826
    1 point
  3. Correct. The static initializer where you created your RegistryObjects never executed early enough. Putting them in the same class makes this impossible.
    1 point
  4. Do not put a DeferredRegister and its entries in separate classes.
    1 point
  5. Well, then PlayerLoggedInEvent is not enough. You also need to send the data in PlayerChangedDimensionEvent, PlayerRespawnEvent as well as whenever the data changes.
    1 point
  6. What do you mean? How did you determine this? My guess is you are looking at client/server. Only the server side saves to disk (obviously).
    1 point
  7. Javadocs are built off crowdsourced mappings/docs that change depending on the status of the crowdsourced projects. So, no there is no good javadocs project or website because they always change. You're more then free to build the javadocs yourself for your workspace. And/Or use your IDE's built in javadoc reader. The only/best official docs are https://mcforge.readthedocs.io/en/latest/ created by users in this repo: https://github.com/MinecraftForge/Documentation
    1 point
  8. 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
  9. A spawn egg can have its type overwritten by the ItemStack NBT data. Hence getType expects the NBT data being passed in. You can pass null if you just want the egg's default entity type.
    1 point
  10. Currently Java 8-15 are supported. Java 8 is recommended, as that is the version Mojang ships with their launcher.
    1 point
  11. In fact this specifically is the issue. Java 16 is not yet supported.
    1 point
  12. Actually in vanilla the sidebar never disappears in my tests. I have found the bug, just not sure how to fix it yet. Thank you for the report.
    1 point
  13. Note that I am no expert on mappings, and I think generally it is best to use the same mappings as most other people use to make life easier for everybody. However, with that said, this should work: 1. Add this to your build.gradle to create a local maven repo on your computer: repositories { maven { url "file:///${project.projectDir}/mappings" } } 2. Change back the mappings channel (the mappings channel is hardcoded to use 'official', 'snapshot' and 'stable' so you have to use one of those): mappings channel: 'snapshot', version: 'vemerion-mappings' You can
    1 point
  14. 1 point
  15. This. The reason for this is that DeferredRegister relies on static initializers. If you put your RegistryObjects in some random class it is not guaranteed that that class is actually initialized by the time your DeferredRegister is. Hence: Put the DeferredRegister and its entries in the same class. @ObjectHolder is explained here: https://mcforge.readthedocs.io/en/latest/concepts/registries/#using-objectholder
    1 point
  16. First of all the BLOCKS and ITEMS fields (i.e. your DeferredRegister instances) should not be in a separate class. Put them in the same class or you will have issues. No, you cannot, because then you defeat the entire purpose of DeferredRegister. You must create your registry objects (blocks, items, etc.) in the registry event. DeferredRegister manages this for you. If you don't want this, you can also manually subscribe to RegistryEvent and create and register your things there. You can then use @ObjectHolder to obtain the instances for your registry entries. You can also mix and matc
    1 point
  17. There is none that I know of. But I will be working on a patch to Forge to work around this problem.
    1 point
  18. setDefaultState is called in mojang mappings registerDefaultState you can use the bot an the forge discord server https://discord.com/invite/UvedJ9m EDIT: commands: mcpe -> mojang : !moj -c mcp methode/field/(1.17) class mojang -> mcpe : !mcp -c moj methode/field/(1.17) class this create StateDefinition but set not the default values
    1 point
  19. Add protected void createBlockStateDefinition(StateContainer.Builder<Block, BlockState> builder) { builder.add(LEVEL); } snippet taken from the CauldronBlock with slight edit
    1 point
  20. You lack this method: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/block/ore/HardOreBlock.java#L51-L54 I'm not sure what the Mojang mapping name is for it, but you still lack it.
    1 point
  21. Look the Forge's source code. In BedBlock, minecrafts uses PlayerEntity#displayClientMessage to display sleep result (which can be success or failure, so "You can only sleep at night"). Just give an ITextComponent (StringTextComponent or TranslationTextComponent in most cases) and set the second boolean to true to send an state text instead of sending it to the chat. So: PlayerEntity player = //Get player here player.displayClientMessage(new StringTextComponent(""), true); I havn't check that, but it should be somthing like that
    1 point
  22. To be tinted your model face needs to have a tintindex set (not -1, which is the default and means "do not tint"). block/cube_all has no tintindex set for any of its faces - as such your model does not get tinted.
    1 point
  23. you have to overwrite the DimensionType file (minecraft / data / dimension_type / the_nether.json) create a file with the exact name in this directory, take a look at these two links my dimension type for a new dimension and the minecraft wiki for dimensions (look at the vanilla defaults) https://github.com/Luis-st/Forge-1.16.5-Nero/blob/main/src/main/resources/data/nero/dimension_type/deepslate.json https://minecraft.fandom.com/wiki/Custom_dimension
    1 point
  24. Howdy You might find this tutorial useful It works in 1.16.3 see example mbe45... https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe45_commands http://greyminecraftcoder.blogspot.com/2020/05/minecraft-by-example.html Cheers Richard
    1 point
  25. Well it first of all, you need code that checks all the block positions starting from the player position. However, note that as the distance gets farther the number of blocks required grows very large, so you will have to limit the range for checking to about 10 blocks for performance reasons. For the actually checking, you just loop through all the block locations using "for" loops for each of the x, y, and z dimensions and look for the block. Note though you need to check the distance of each of the target type blocks you find to see if you've actually found the closest.
    1 point
  26. This PR would have allowed you to control the movement speed while the item was in use, but the author hasn't responded for a while. If you were to update it, it may be merged for 1.12.1 and possibly 1.11.2.
    1 point
  27. Thanks for showing me the right direction.
    1 point
  28. To find all of the hostile mobs within 5 blocks, List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(player, player.boundingBox.expand(5.0D, 5.0D, 5.0D)); and then run through those and see which ones are hostile via instanceof. Then, if they are, entity.setDead().
    1 point
  29. Ok, so I have this now. Is there a specific code I need to enter in genericName's place (I chose a temporary name because I didn't know what to use) or can I name it something easier to remember?
    0 points


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