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.

Leaderboard

Popular Content

Showing content with the highest reputation on 11/14/21 in Posts

  1. no it´s not since you can only subscribe a class to one Dist server or client if you don't enter a dist it will run on both (common) the events are called, no matter what class they are in if you combine several events (which are registered on the same Dist) in one class you may save some RAM in the extreme case 1-2MB (depends on the class size) I would recommend that you sort the Events/summarize them in classes, that you can handle the code
  2. What. Gross. First off, you could just loop ax = -1; ax <= 1 (same for y and z) and then use BlockPos.add(ax, ay, az) Or you could use the static method in the BlockPos class to get all blocks in range and iterate over the resulting collection (the MCP name was getAllInBox). Older code, but example of the latter: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/EventHandlers.java#L121
  3. @SubscribeEvent public static void crimsonIngotCraft(EntityJoinWorldEvent event){ Entity entity = event.getEntity(); World world = entity.world; double posX = entity.getPosX(); double posY = entity.getPosY(); double posZ = entity.getPosZ(); if(entity instanceof ItemEntity && !(entity instanceof SpecialItemEntity)){ ItemEntity itemEntity = (ItemEntity) event.getEntity(); if(itemEntity.getItem().getItem() == itemInit.RED_PEARL.get()){ SpecialItemEntity ie = new SpecialItemEntity(entity.world,entity.getPosX(),entity.getPosY(),entity.getPosZ(),((ItemEntity) entity).getItem()); event.setCanceled(true); SpecialItemEntity specialItemEntity = new SpecialItemEntity(world,posX,posY,posZ,((ItemEntity) entity).getItem().getStack()); } } } I changed code into this and SpecialItemEntity clas is: package com.azizd.thunderbird.entities; import com.azizd.thunderbird.init.blockInit; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class SpecialItemEntity extends ItemEntity { public SpecialItemEntity(World worldIn, double x, double y, double z, ItemStack stack) { super(worldIn, x, y, z, stack); } @Override public void tick() { BlockPos pos= new BlockPos(getPosX(),getPosY(),getPosZ()); if(inWater){ this.setDead(); this.world.setBlockState(pos,blockInit.BLOCK_OF_RED_PEARL.get().getDefaultState()); } } } The item deletes when i press the q button.

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.