Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Thomas Schwarz

Members
  • Joined

Everything posted by Thomas Schwarz

  1. Nevermind forgot to make the other methods static. It works
  2. Sorry I am new to java and modding. What do you mean?
  3. Hello, I want the player's hitbox to get smaller (e.g. when pressing a key combination). To do this, I assigned a tag to the player, but the Entityevent.Size event does not fire. Can someone help me? package de.chrisicrafter.vampires.event; import de.chrisicrafter.vampires.Vampires; import net.minecraft.world.entity.EntityDimensions; import net.minecraft.world.entity.player.Player; import net.minecraftforge.event.entity.EntityEvent; import net.minecraftforge.event.entity.living.LivingAttackEvent; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = Vampires.MODID) public class ModEvents { @SubscribeEvent public void onSizeEvent(EntityEvent.Size event) { Vampires.LOGGER.info("Size Event"); Player player = (Player) event.getEntity(); if (player.getTags().contains("small")) { Vampires.LOGGER.info("SMALL"); event.setNewSize(new EntityDimensions(0.5f,0.25f,true)); } else { Vampires.LOGGER.info("NORMAL"); event.setNewSize(new EntityDimensions(1f,1f,true)); } } @SubscribeEvent public void onLoginEvent(PlayerEvent.PlayerLoggedInEvent event) { System.out.println("Login Event"); Player player = (Player) event.getEntity(); } @SubscribeEvent public static void onLivingAttackEvent(LivingAttackEvent event) { Vampires.LOGGER.info("event is here"); } } NOTE: - The LivingAttackEvent works

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.