Rename the event to RenderSpecificHandEvent
This commit is contained in:
parent
31b3825069
commit
cfba330459
|
@ -13,7 +13,7 @@
|
|||
{
|
||||
float f3 = enumhand == EnumHand.MAIN_HAND ? f : 0.0F;
|
||||
float f5 = 1.0F - (this.field_187470_g + (this.field_187469_f - this.field_187470_g) * p_78440_1_);
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHandSpecific(EnumHand.MAIN_HAND, p_78440_1_, f1, f3, f5, this.field_187467_d))
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(EnumHand.MAIN_HAND, p_78440_1_, f1, f3, f5, this.field_187467_d))
|
||||
this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.MAIN_HAND, f3, this.field_187467_d, f5);
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
|||
{
|
||||
float f4 = enumhand == EnumHand.OFF_HAND ? f : 0.0F;
|
||||
float f6 = 1.0F - (this.field_187472_i + (this.field_187471_h - this.field_187472_i) * p_78440_1_);
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHandSpecific(EnumHand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187468_e))
|
||||
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(EnumHand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187468_e))
|
||||
this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.OFF_HAND, f4, this.field_187468_e, f6);
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ import net.minecraftforge.client.event.ModelBakeEvent;
|
|||
import net.minecraftforge.client.event.MouseEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderHandEvent;
|
||||
import net.minecraftforge.client.event.RenderHandEventSpecific;
|
||||
import net.minecraftforge.client.event.RenderSpecificHandEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.client.event.ScreenshotEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
|
@ -171,9 +171,9 @@ public class ForgeHooksClient
|
|||
return MinecraftForge.EVENT_BUS.post(new RenderHandEvent(context, partialTicks, renderPass));
|
||||
}
|
||||
|
||||
public static boolean renderFirstPersonHandSpecific(EnumHand hand, float partialTicks, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
|
||||
public static boolean renderSpecificFirstPersonHand(EnumHand hand, float partialTicks, float interpPitch, float swingProgress, float equipProgress, ItemStack stack)
|
||||
{
|
||||
return MinecraftForge.EVENT_BUS.post(new RenderHandEventSpecific(hand, partialTicks, interpPitch, swingProgress, equipProgress, stack));
|
||||
return MinecraftForge.EVENT_BUS.post(new RenderSpecificHandEvent(hand, partialTicks, interpPitch, swingProgress, equipProgress, stack));
|
||||
}
|
||||
|
||||
public static void onTextureStitchedPre(TextureMap map)
|
||||
|
|
|
@ -27,7 +27,8 @@ import net.minecraft.client.renderer.RenderGlobal;
|
|||
* This event is fired on {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}
|
||||
* before both hands are rendered.
|
||||
* Canceling this event prevents either hand from being rendered,
|
||||
* and prevents {@link RenderHandEventSpecific} from firing.
|
||||
* and prevents {@link RenderSpecificHandEvent} from firing.
|
||||
* TODO This may get merged in 11 with RenderSpecificHandEvent to make a generic hand rendering
|
||||
*/
|
||||
@Cancelable
|
||||
public class RenderHandEvent extends Event
|
||||
|
|
|
@ -11,9 +11,10 @@ import javax.annotation.Nullable;
|
|||
* This event is fired on the {@link net.minecraftforge.common.MinecraftForge#EVENT_BUS}
|
||||
* whenever a hand is rendered in first person.
|
||||
* Canceling the event causes the hand to not render.
|
||||
* TODO This may get merged in 11 with RenderHandEvent to make a generic hand rendering
|
||||
*/
|
||||
@Cancelable
|
||||
public class RenderHandEventSpecific extends Event
|
||||
public class RenderSpecificHandEvent extends Event
|
||||
{
|
||||
private final EnumHand hand;
|
||||
private final float partialTicks;
|
||||
|
@ -22,7 +23,7 @@ public class RenderHandEventSpecific extends Event
|
|||
private final float equipProgress;
|
||||
private final ItemStack stack;
|
||||
|
||||
public RenderHandEventSpecific(EnumHand hand, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack)
|
||||
public RenderSpecificHandEvent(EnumHand hand, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, ItemStack stack)
|
||||
{
|
||||
this.hand = hand;
|
||||
this.partialTicks = partialTicks;
|
Loading…
Reference in New Issue