Fixed EntityJoinWorldEvent not being fired when player is added to ServerWorld. #5827

Fixed wrong example path for the access transformer in the MDK build.gradle. #5891
Added getters for mouse x/y velocity and if the middle-mouse button is being held down. #5776
Modify issue template for better clarity. #5874
Fixed grindstone not using ItemStack-sensitive getMaxDamage. #5831
Added ParticleManager.registerFactory to Forge's AT. #5896
Fixed NPE in SidedInvWrapper when side was null. #5787
Moved EndermanEntity.setAttackTarget super call to allow LivingSetAttackTargetEvent the ability to override default behavior. #5778
Added field to make "Looking at" debug info maximum distance configurable #5714
This commit is contained in:
LexManos committed 2019-07-08 18:42:12 -07:00
1 parent f720140481
commit 61bea2bfda
10 files changed
+98 -21

No files matched your search

@@ -27,10 +27,12 @@ import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class SidedInvWrapper implements IItemHandlerModifiable
{
protected final ISidedInventory inv;
@Nullable
protected final Direction side;
@SuppressWarnings("unchecked")
@@ -43,13 +45,13 @@ public class SidedInvWrapper implements IItemHandlerModifiable
return ret;
}
public SidedInvWrapper(ISidedInventory inv, Direction side)
public SidedInvWrapper(ISidedInventory inv, @Nullable Direction side)
{
this.inv = inv;
this.side = side;
}
public static int getSlot(ISidedInventory inv, int slot, Direction side)
public static int getSlot(ISidedInventory inv, int slot, @Nullable Direction side)
{
int[] slots = inv.getSlotsForFace(side);
if (slot < slots.length)
@@ -74,7 +76,7 @@ public class SidedInvWrapper implements IItemHandlerModifiable
public int hashCode()
{
int result = inv.hashCode();
result = 31 * result + side.hashCode();
result = 31 * result + (side == null ? 0 : side.hashCode());
return result;
}