Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. Yes its possible, check out what the particle command dose and do that in the onArmorTick methode in your item class
  2. the first parameter (Property<T>) is a BlockStateProperty and not a block, and the second is the value of the Property os like this: Blocks.ACACIA_LOG.defaultBlockState().setValue(RotatedPillarBlock.AXIS, Direction.Axis.X);
  3. First create your own thread, second, read the posts in this thread the explanation is sufficient to use this for your purposes
  4. playerEntity.getItemInHand(hand).setDamageValue(playerEntity.getItemInHand(hand).getDamageValue() + 1); this is the best solution for your problem
  5. use the automatic event registry https://mcforge.readthedocs.io/en/latest/events/intro/#automatically-registering-static-event-handlers
  6. You never put the new ItemStack into hand of the player
  7. Check if the RessourceLocation from the biome and the RegistryKey#location are equal
  8. I mean that but it dosen't work with Biomes, because you getting a RegistryKey<Biome>. You also can check if the Biome you get from the World eqauls Biomes#SWAMP
  9. You can use Registry#BIOMES and than do your logic
  10. ForgeRegistries cantains only the biomes that are add via mods, and not the vanilla Biomes
  11. you will need: a custom block (your crafting table block) a custom WorkbenchContainer, you need to overwrite the stillValid method and if you want you can change some vanilla logic
  12. keep this forum in english please, look at the logs folder, the file you should post is named "latest.log"
  13. if the code above is still partly up-to-date, then it is due to the onHitBlock method because you only set the activate method on the server side Edit: Entity#addAdditionalSaveData and Entity#readAdditionalSaveData these methods only save and write the data of the entity
  14. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  15. these are unmapped parameter names, mojang only gives forge the names of fields and methods (1.17 and classes). this is the type of the entity like EntityClassification#MONSTER (zombie), EntityClassification#CREATURE (villager), EntityClassification#AMBIENT (bat), and so on
  16. the "bloodghastSpawns" method is wrong remove them but copy the code inside the methode. then replace "genericName" with event.getSpawns() an it should work... explain
  17. take a look at the PortalSize class, the Teleporter class and the NetherPortalBlock class
  18. you can use the bot on the forge discord server commands: mcp -> mojang: !mcp -c moj <methode,field> mojang-> mcp: !moj -c mcp <methode,field>
  19. please learn basic java before modding minecraft i already told you what you have to do. the code part genericName.addSpawn... is correct, but you put a method in a method that is completely wrong in addition you never use the event
  20. Congratulations you have now successfully subscribed to an event now use BiomeLoadingEvent#getSpawns to get the MobSpawnInfo.Builder for the biome, then use MobSpawnInfo.Builder#addSpawn to add a new ModSpawn MobSpawnInfo.Spawners need 4 parameter: the entity you want to spawn the weight of the spwn the min spawn count the max spawn count you can take a look in DefaultBiomeFeatures#farmAnimals this is an simple example what you have to do
  21. use @EventBusSubscriber put them on the class
  22. your tutorial is for version 1.14 / 1.15, but minecraft change the biome/world gen (also include entity spawning) in 1.16.2, if you try your code in 1.16.1 it will work also you don't need to create a new Event, subscribe to it! okay there you don't understand what to do: use the code snippet from the static EventHandle and replace the event with BiomeLoadingEvent, and then check out the methods in the event (e.g. BiomeLoadingEvent#getSpawns), than do your logic there
  23. https://mcforge.readthedocs.io/en/1.15.x/events/intro/#creating-an-event-handler if you know basic java and reading the doc, it's easy again read the doc and look at the code snippets this are examples
  24. does it work? did your understand what you have to do?
  25. did you read the doc? did you look at the code snippets?
×
×
  • Create New...

Important Information

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