mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 23:13:15 +00:00
Fix checkPatches task. Closes #6956
Fix patched in method using srg name. Closes #6965 Fix capabilities not being collected for ClientWorld. Closes #6966 Fix TagEmptyCondition using client side copy of tags instead of server. Closes #6949 Fix ExtendedButton using narrator text. Closes #6958, Closes #6959 Fix misaligned patch in RepairContainer. Closes #6950, Closes #6953 Fix LivingJumpEvent not being fired for players jumping horses. Closes #6929 Remove extra getToughness method in ArmorItem. Closes #6970 Remove GetCollisionBoxesEvent. Closes #6921
This commit is contained in:
1 parent
065ebde57e
commit
201349f8de
12 files changed
+49
-116
No files matched your search
@@ -128,7 +128,6 @@ import net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent.NeighborNotifyEvent;
|
||||
import net.minecraftforge.event.world.ChunkWatchEvent;
|
||||
import net.minecraftforge.event.world.ExplosionEvent;
|
||||
import net.minecraftforge.event.world.GetCollisionBoxesEvent;
|
||||
import net.minecraftforge.event.world.PistonEvent;
|
||||
import net.minecraftforge.event.world.SaplingGrowTreeEvent;
|
||||
import net.minecraftforge.event.world.SleepFinishedTimeEvent;
|
||||
@@ -672,12 +671,6 @@ public class ForgeEventFactory
|
||||
return !MinecraftForge.EVENT_BUS.post(new LivingDestroyBlockEvent(entity, pos, state));
|
||||
}
|
||||
|
||||
public static boolean gatherCollisionBoxes(World world, Entity entity, AxisAlignedBB aabb, List<AxisAlignedBB> outList)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.post(new GetCollisionBoxesEvent(world, entity, aabb, outList));
|
||||
return outList.isEmpty();
|
||||
}
|
||||
|
||||
public static boolean getMobGriefingEvent(World world, Entity entity)
|
||||
{
|
||||
EntityMobGriefingEvent event = new EntityMobGriefingEvent(entity);
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2020.
|
||||
*
|
||||
* 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.event.world;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This event is fired during {@link World#collidesWithAnyBlock(AxisAlignedBB)}
|
||||
* and before returning the list in {@link World#getCollisionBoxes(Entity, AxisAlignedBB)}<br>
|
||||
* <br>
|
||||
* {@link #entity} contains the entity passed in the {@link World#getCollisionBoxes(Entity, AxisAlignedBB)}. <b>Can be null.</b> Calls from {@link World#collidesWithAnyBlock(AxisAlignedBB)} will be null.<br>
|
||||
* {@link #aabb} contains the AxisAlignedBB passed in the method.<br>
|
||||
* {@link #collisionBoxesList} contains the list of detected collision boxes intersecting with {@link #aabb}. The list can be modified.<br>
|
||||
* <br>
|
||||
* This event is not {@link Cancelable}.<br>
|
||||
* <br>
|
||||
* This event does not have a result. {@link HasResult} <br>
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.<br>
|
||||
**/
|
||||
public class GetCollisionBoxesEvent extends WorldEvent
|
||||
{
|
||||
private final Entity entity;
|
||||
private final AxisAlignedBB aabb;
|
||||
private final List<AxisAlignedBB> collisionBoxesList;
|
||||
|
||||
public GetCollisionBoxesEvent(World world, @Nullable Entity entity, AxisAlignedBB aabb, List<AxisAlignedBB> collisionBoxesList)
|
||||
{
|
||||
super(world);
|
||||
this.entity = entity;
|
||||
this.aabb = aabb;
|
||||
this.collisionBoxesList = collisionBoxesList;
|
||||
}
|
||||
|
||||
public Entity getEntity()
|
||||
{
|
||||
return entity;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getAabb()
|
||||
{
|
||||
return aabb;
|
||||
}
|
||||
|
||||
public List<AxisAlignedBB> getCollisionBoxesList()
|
||||
{
|
||||
return collisionBoxesList;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user