mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
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:
1 parent
f720140481
commit
61bea2bfda
10 files changed
+98
-21
No files matched your search
@@ -88,6 +88,10 @@ public class ForgeIngameGui extends IngameGui
|
||||
|
||||
public static int left_height = 39;
|
||||
public static int right_height = 39;
|
||||
/*
|
||||
* If the Euclidian distance to the moused-over block in meters is less than this value, the "Looking at" text will appear on the debug overlay.
|
||||
*/
|
||||
public static double rayTraceDistance = 20.0D;
|
||||
|
||||
private FontRenderer fontrenderer = null;
|
||||
private RenderGameOverlayEvent eventParent;
|
||||
@@ -842,8 +846,8 @@ public class ForgeIngameGui extends IngameGui
|
||||
public void update()
|
||||
{
|
||||
Entity entity = this.mc.getRenderViewEntity();
|
||||
this.rayTraceBlock = entity.func_213324_a(20.0D, 0.0F, false);
|
||||
this.rayTraceFluid = entity.func_213324_a(20.0D, 0.0F, true);
|
||||
this.rayTraceBlock = entity.func_213324_a(rayTraceDistance, 0.0F, false);
|
||||
this.rayTraceFluid = entity.func_213324_a(rayTraceDistance, 0.0F, true);
|
||||
}
|
||||
@Override protected void renderDebugInfoLeft(){}
|
||||
@Override protected void renderDebugInfoRight(){}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user