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 08/25/20 in Posts

  1. You are on the right track, and I agree that the vanilla respawn code is complex. Here is how I solved it: (Make sure to put this after a !world.isRemote check to avoid reaching across sides) ServerPlayerEntity player = (ServerPlayerEntity) event.player; // Get the player somehow (from a parameter or similar) ServerWorld respawnWorld = player.server.getWorld(player.func_241141_L_()); BlockPos spawn = player.func_241140_K_(); float spawnAngle = player.func_242109_L(); boolean forcedSpawn = false; boolean preserveAnchorCharges = true; Optional<Vector3d> maybeSpawn = PlayerEntity.func_242374_a(respawnWorld, spawn, spawnAngle, forcedSpawn, preserveAnchorCharges); Then the maybeSpawn will contain the respawn position of the player, and the respawnWorld will be the world in which the player will respawn. Of course, the maybeSpawn can be empty, and then you have to get the respawn position from the world.
  2. Probably. Which means that it is a lower priority than the regular BreedGoal because it's later in the task list. You either: (a) need to remove the original goal (b) make your goal have a higher priority
  3. AI tasks have a priority value and a "can run simultaneously" bitmask value. If your task has the same bits set as another take, but a lower priority (towards positive infinity, iirc) then it won't run. So Show your code.
  4. Have you tried ModItems.MESSAGE_SCROLL.get()? The method comment for RegistryObject::get is:
  5. Which parts are you not understanding? The explanation is very basic Java, and if you don't understand that, you are going to have a Very Bad Time trying to mod. Not trying to be mean, just stating facts. There isn't really a much easier way to explain what vemerion said without going to Java School (this isn't Java School, this is Forge School )
  6. You could perhaps listen to the PotionRemoveEvent and check for a specific effect, and then cancel the event.

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.