Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/08/20 in all areas

  1. Make sure executes() is located in then(). For example .requires(cs -> cs.hasPermissionLevel(0)) .then(Commands.argument("size", FloatArgumentType.floatArg()) .executes(COMMAND));
    1 point
  2. Working code snippet for anyone who wants it: @SubscribeEvent public void preRenderPlayer(RenderPlayerEvent.Pre event) { event.getMatrixStack().push(); event.getMatrixStack().scale(0.5f, 0.5f, 0.5f); } @SubscribeEvent public void postRenderPlayer(RenderPlayerEvent.Post event) { event.getMatrixStack().pop(); }
    1 point
  3. event.getMatrixStack().scale(0.25f, 0.5f, 0.25f); event.getMatrixStack().pop(); event.getMatrixStack().push(); You should call MatrixStack#push then do your own transformations, and pop afterwards (after finish your rendering). Afaik you can't just scale the player's model there, you need to hide them in Pre and render them yourself in Post.
    1 point
  4. The OP is asking about Vanilla loot conditions and functions, not global loot modifiers. I'm not 100% sure if it's the correct time to register them, but I do it on the main thread after FMLCommonSetupEvent (i.e. inside a lambda passed to event.enqueueWork). I use the Vanilla registries, just like in your example. I'm not sure if it's necessary to register non-Forge registry entries at any specific time like it is with Forge registry entries. This is my FMLCommonSetup handler, this is my LootConditionType registration and this is my LootFunctionType registration.
    1 point
×
×
  • Create New...

Important Information

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