• 1

    posted a message on What size for a logo is recommended for my mods logo that will be shown in the mods section of minecraft main menu?

    What size you use for logo does not really matter, for example Forge's own logo is 589x94, the Mouse Tweaks mod logo is 191x100, the Bookshelf mod logo is 128x64 and so on. Basically, use whatever size you want.

    Posted in: Modification Development
  • 1

    posted a message on I NEED HELP

    You have to specify a client entrypoint like described here.

    Posted in: Modification Development
  • 1

    posted a message on I NEED HELP

    You need to add NarutoModClient as a client entrypoint. Add this below the "main" array:

    "client": [
    "com.mikcla.narutomod.client.NarutoModClient"
    ]


    Also note that you then also need to add a comma after the "main" array.

    Posted in: Modification Development
  • 1

    posted a message on I NEED HELP

    Would you mind sharing your fabric.mob.json file?

    Posted in: Modification Development
  • 1

    posted a message on I NEED HELP

    The code looks correct. If you put a breakpoint in the onInitializeClient() method, can you verify that it is actually called?

    Posted in: Modification Development
  • 1

    posted a message on I NEED HELP

    It looks like you never register an entity renderer for your entity. Did you make sure to register it in the onInitializeClient() method? Also, did you add your client init class as an entrypoint in your fabric.mob.json file?

    Posted in: Modification Development
  • 1

    posted a message on Event Food Eaten

    First of all, remote the 'value = Dist.CLIENT', since then the code will only run on the client, which is not what you want (here is the forge documentation on sides). Second, subscribe to the LivingEntityUseItemEvent.Finish event instead of LivingEvent. You can then use for example the attemptTeleport() method on the entity to teleport it.

    Posted in: Modification Development
  • 1

    posted a message on Change player permission to fly

    I think it is player.abilities.allowFlying.

    Posted in: Modification Development
  • 1

    posted a message on How would I convert a map in game to an external image?

    Here is an example of me spamming the console with the colors arrays to the console, when the player is holding a filled map:


    	@SubscribeEvent
    	public static void clientTick(ClientTickEvent event) {
    		if (Minecraft.getMinecraft() == null || Minecraft.getMinecraft().player == null)
    			return;
    		
    		ItemStack stack = Minecraft.getMinecraft().player.getHeldItemMainhand();
    		if (stack.getItem() == Items.FILLED_MAP) {
    			MapData data = ((ItemMap) stack.getItem()).getMapData(stack, Minecraft.getMinecraft().world);
    			if (data != null) {
    				System.out.println(Arrays.toString(data.colors));
    			}
    		}
    	}
    Posted in: Modification Development
  • 1

    posted a message on [Solved] Make an event take durability of a tool

    To reduce the durability of an item, you would use ItemStack.damageItem(), for example:


    event.getItemStack().damageItem(amount of damage, player, e -> e.sendBreakAnimation(EquipmentSlotType.MAINHAND);


    The last parameter is used for creating the break animation when the item completely runs out of durability. You could for example check out the elytraFlightTick() method in the ElytraItem class to see an example of how vanilla uses the damageItem() method.

    Posted in: Modification Development
  • To post a comment, please .