Stronger hitbox

Discussion in 'Plugin Development' started by gnomik12, Jul 15, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    gnomik12

    Are there ways to prevent players from getting into the hitboxes of entities (especially into the falling block)?
     
  2. Offline

    Kars

    On PlayerMoveEvent, loop through all entities in a player's chunk. If they are on the same location as player, move the player back to the last location they were at before they entered their current one. You need to have a list that keeps track of every player's last location that updates when they enter a new one. You probably should keep track of the say, 5 last locations, to have a fallback if an entity happens to enter the player's last location.

    All of this happens every PlayerMoveEvent. It will be VERY performance heavy. But it can be done.
     
Thread Status:
Not open for further replies.

Share This Page