mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Fixed all compile errors except the 4 in KeyBinding.
This commit is contained in:
1 parent
a0e217b1dc
commit
c191851ec0
31 files changed
+921
-465
No files matched your search
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2018.
|
||||
*
|
||||
* 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.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
|
||||
/**
|
||||
* MinecartCollisionEvent is fired when a minecart collides with an Entity.
|
||||
* This event is fired whenever a minecraft collides in
|
||||
* {@link EntityMinecart#applyEntityCollision(Entity)}.
|
||||
*
|
||||
* {@link #collider} contains the Entity the Minecart collided with.
|
||||
*
|
||||
* This event is not {@link Cancelable}.
|
||||
*
|
||||
* This event does not have a result. {@link HasResult}
|
||||
*
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
public class MinecartCollisionEvent extends MinecartEvent
|
||||
{
|
||||
private final Entity collider;
|
||||
|
||||
public MinecartCollisionEvent(EntityMinecart minecart, Entity collider)
|
||||
{
|
||||
super(minecart);
|
||||
this.collider = collider;
|
||||
}
|
||||
|
||||
public Entity getCollider()
|
||||
{
|
||||
return collider;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2018.
|
||||
*
|
||||
* 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.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.EntityEvent;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
/**
|
||||
* MinecartEvent is fired whenever an event involving minecart entities occurs. <br>
|
||||
* If a method utilizes this {@link net.minecraftforge.eventbus.api.Event} as its parameter, the method will <br>
|
||||
* receive every child event of this class.<br>
|
||||
* <br>
|
||||
* {@link #minecart} contains the minecart entity involved with this event.<br>
|
||||
* <br>
|
||||
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.<br>
|
||||
**/
|
||||
public class MinecartEvent extends EntityEvent
|
||||
{
|
||||
private final EntityMinecart minecart;
|
||||
|
||||
public MinecartEvent(EntityMinecart minecart)
|
||||
{
|
||||
super(minecart);
|
||||
this.minecart = minecart;
|
||||
}
|
||||
|
||||
public EntityMinecart getMinecart()
|
||||
{
|
||||
return minecart;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2018.
|
||||
*
|
||||
* 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.entity.minecart;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumHand;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
/**
|
||||
* MinecartInteractEvent is fired when a player interacts with a minecart. <br>
|
||||
* This event is fired whenever a player interacts with a minecart in
|
||||
* {@link EntityMinecart#processInitialInteract(EntityPlayer, EnumHand)}.
|
||||
* <br>
|
||||
* <br>
|
||||
* {@link #player} contains the EntityPlayer that is involved with this minecart interaction.<br>
|
||||
* <br>
|
||||
* This event is {@link net.minecraftforge.eventbus.api.Cancelable}.<br>
|
||||
* If this event is canceled, the player does not interact with the minecart.<br>
|
||||
* <br>
|
||||
* This event does not have a result. {@link HasResult}<br>
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
public class MinecartInteractEvent extends MinecartEvent
|
||||
{
|
||||
private final EntityPlayer player;
|
||||
private final EnumHand hand;
|
||||
|
||||
public MinecartInteractEvent(EntityMinecart minecart, EntityPlayer player, EnumHand hand)
|
||||
{
|
||||
super(minecart);
|
||||
this.player = player;
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
public EntityPlayer getPlayer() { return player; }
|
||||
@Nonnull
|
||||
public ItemStack getItem() { return player.getHeldItem(hand); }
|
||||
public EnumHand getHand() { return hand; }
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2018.
|
||||
*
|
||||
* 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.entity.minecart;
|
||||
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
|
||||
/**
|
||||
* MinecartUpdateEvent is fired when a minecart is updated.<br>
|
||||
* This event is fired whenever a minecart is updated in
|
||||
* {@link EntityMinecart#onUpdate()}.<br>
|
||||
* <br>
|
||||
* {@link #pos} contains the coordinate of the track the entity is on {if applicable}.<br>
|
||||
* <br>
|
||||
* This event is not {@link net.minecraftforge.eventbus.api.Cancelable}.<br>
|
||||
* <br>
|
||||
* This event does not have a result. {@link HasResult}<br>
|
||||
* <br>
|
||||
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
||||
**/
|
||||
public class MinecartUpdateEvent extends MinecartEvent
|
||||
{
|
||||
private final BlockPos pos;
|
||||
|
||||
public MinecartUpdateEvent(EntityMinecart minecart, BlockPos pos)
|
||||
{
|
||||
super(minecart);
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
public BlockPos getPos()
|
||||
{
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user