Remove event stuff

This commit is contained in:
Vincent Lee 2016-07-09 08:54:38 -05:00
parent 591ecdd7c9
commit 17858ef497
No known key found for this signature in database
GPG Key ID: 5E313C116869B316
2 changed files with 0 additions and 68 deletions

View File

@ -46,7 +46,6 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.Vec3d;
@ -102,7 +101,6 @@ import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.BlockEvent.MultiPlaceEvent;
import net.minecraftforge.event.world.BlockEvent.NeighborNotifyEvent;
import net.minecraftforge.event.world.BlockEvent.PlaceEvent;
import net.minecraftforge.event.world.DetectorRailComparatorEvent;
import net.minecraftforge.event.world.ExplosionEvent;
import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
@ -587,11 +585,4 @@ public class ForgeEventFactory
return event.getTable();
}
public static int onDetectorRailCompare(BlockPos pos, AxisAlignedBB box)
{
DetectorRailComparatorEvent evt = new DetectorRailComparatorEvent(pos, box);
MinecraftForge.EVENT_BUS.post(evt);
return evt.getRedstonePower();
}
}

View File

@ -1,59 +0,0 @@
package net.minecraftforge.event.world;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.common.eventhandler.Event;
/**
* This event is fired serverside whenever a Detector Rail looks for a minecart to get a comparator value from
* in {@link net.minecraft.block.BlockRailDetector#getComparatorInputOverride}.
* This event is not cancelable.
* This event is fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}.
*/
public class DetectorRailComparatorEvent extends Event
{
private final BlockPos pos;
private final AxisAlignedBB searchBox;
private int redstonePower;
public DetectorRailComparatorEvent(BlockPos pos, AxisAlignedBB searchBox)
{
this.pos = pos;
this.searchBox = searchBox;
this.redstonePower = -1;
}
/**
* @return The position of the Detector Rail
*/
public BlockPos getPos()
{
return pos;
}
/**
* @return The bounding box that is to be searched for minecarts
*/
public AxisAlignedBB getSearchBox()
{
return searchBox;
}
/**
* @return The redstone signal strength to give the comparator. Values below 0 mean vanilla logic will run.
*/
public int getRedstonePower()
{
return redstonePower;
}
/**
* Set the redstone power to give the comparator. Values below 0 mean vanilla logic will run.
*/
public void setRedstonePower(int redstonePower)
{
this.redstonePower = redstonePower;
}
}