Files
MinecraftForge/src/main/java/net/minecraftforge/common/IMinecartCollisionHandler.java
T
be5446b91c Update to 1.17
Update to Official classnames
Patchwork
Make the game compile and run
Merge in the new HUD overlay API
Merge in the new render properties API
PEEL
Use Gradle 7.2 snapshot to fix eclipse integration bug in 7.1, Would use 7.0 but FG needs 7.1 for some reason.
New FML installer
Update to 1.17.1

Co-authored-by: LexManos <lexmanos@gmail.com>
Co-authored-by: SizableShrimp <sizableshrimp@sizableshrimp.me>
Co-authored-by: cpw <cpw+github@weeksfamily.ca>
Co-authored-by: Curle <curle@gemwire.uk>
Co-authored-by: Unnoen <Unnoen@users.noreply.github.com>
Co-authored-by: covers1624 <laughlan.cov@internode.on.net>
Co-authored-by: DaemonUmbra <daemon.umbra@gmail.com>
Co-authored-by: gigaherz <gigaherz@gmail.com>
Signed-off-by: SizableShrimp <sizableshrimp@sizableshrimp.me>
2021-07-22 19:57:02 +01:00

70 lines
2.6 KiB
Java

/*
* Minecraft Forge
* Copyright (c) 2016-2021.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.common;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.vehicle.AbstractMinecart;
/**
* This class defines a replacement for the default minecart collision code.
* Only one handler can be registered at a time. It it registered with AbstractMinecartEntity.registerCollisionHandler().
* If you use this, make it a configuration option.
* @author CovertJaguar
*/
public interface IMinecartCollisionHandler
{
/**
* This basically replaces the function of the same name in EntityMinecart.
* Code in IMinecartHooks.applyEntityCollisionHook is still run.
* @param cart The cart that called the collision.
* @param other The object it collided with.
*/
void onEntityCollision(AbstractMinecart cart, Entity other);
/**
* This function replaced the function of the same name in EntityMinecart.
* It is used to define whether minecarts collide with specific entities,
* for example items.
* @param cart The cart for which the collision box was requested.
* @param other The entity requesting the collision box.
* @return The collision box or null.
*/
AABB getCollisionBox(AbstractMinecart cart, Entity other);
/**
* This function is used to define the box used for detecting minecart collisions.
* It is generally bigger that the normal collision box.
* @param cart The cart for which the collision box was requested.
* @return The collision box, cannot be null.
*/
AABB getMinecartCollisionBox(AbstractMinecart cart);
/**
* This function replaces the function of the same name in EntityMinecart.
* It defines whether minecarts are solid to the player.
* @param cart The cart for which the bounding box was requested.
* @return The bounding box or null.
*/
AABB getBoundingBox(AbstractMinecart cart);
}