mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-24 22:14:32 +00:00
Update to 1.14.2
This commit is contained in:
1 parent
d3e8804dbf
commit
a7df63e1a1
1010 files changed
+15254
-19520
No files matched your search
@@ -24,7 +24,6 @@ import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
/**
|
||||
* ClientChatEvent is fired whenever the client is about to send a chat message or command to the server. <br>
|
||||
|
||||
@@ -21,30 +21,30 @@ package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
|
||||
@Cancelable
|
||||
public class DrawBlockHighlightEvent extends Event
|
||||
{
|
||||
private final WorldRenderer context;
|
||||
private final EntityPlayer player;
|
||||
private final ActiveRenderInfo info;
|
||||
private final RayTraceResult target;
|
||||
private final int subID;
|
||||
private final float partialTicks;
|
||||
|
||||
public DrawBlockHighlightEvent(WorldRenderer context, EntityPlayer player, RayTraceResult target, int subID, float partialTicks)
|
||||
public DrawBlockHighlightEvent(WorldRenderer context, ActiveRenderInfo info, RayTraceResult target, int subID, float partialTicks)
|
||||
{
|
||||
this.context = context;
|
||||
this.player = player;
|
||||
this.info = info;
|
||||
this.target = target;
|
||||
this.subID = subID;
|
||||
this.partialTicks= partialTicks;
|
||||
}
|
||||
|
||||
public WorldRenderer getContext() { return context; }
|
||||
public EntityPlayer getPlayer() { return player; }
|
||||
public ActiveRenderInfo getInfo() { return info; }
|
||||
public RayTraceResult getTarget() { return target; }
|
||||
public int getSubID() { return subID; }
|
||||
public float getPartialTicks() { return partialTicks; }
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.FogRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.fluid.IFluidState;
|
||||
@@ -36,59 +37,45 @@ import net.minecraftforge.eventbus.api.Event.HasResult;
|
||||
public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.api.Event
|
||||
{
|
||||
private final GameRenderer renderer;
|
||||
private final Entity entity;
|
||||
private final IBlockState state;
|
||||
private final IFluidState fluidState;
|
||||
private final ActiveRenderInfo info;
|
||||
private final double renderPartialTicks;
|
||||
|
||||
public EntityViewRenderEvent(GameRenderer renderer, Entity entity, IBlockState state, IFluidState fluidState, double renderPartialTicks)
|
||||
public EntityViewRenderEvent(GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks)
|
||||
{
|
||||
this.renderer = renderer;
|
||||
this.entity = entity;
|
||||
this.state = state;
|
||||
this.fluidState = fluidState;
|
||||
this.info = info;
|
||||
this.renderPartialTicks = renderPartialTicks;
|
||||
}
|
||||
|
||||
public GameRenderer getRenderer()
|
||||
{
|
||||
return renderer;
|
||||
}
|
||||
|
||||
public Entity getEntity()
|
||||
{
|
||||
return entity;
|
||||
return renderer;
|
||||
}
|
||||
|
||||
public IBlockState getBlockState()
|
||||
public ActiveRenderInfo getInfo()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
||||
public IFluidState getFluidState()
|
||||
{
|
||||
return fluidState;
|
||||
return info;
|
||||
}
|
||||
|
||||
public double getRenderPartialTicks()
|
||||
{
|
||||
return renderPartialTicks;
|
||||
}
|
||||
|
||||
|
||||
private static class FogEvent extends EntityViewRenderEvent
|
||||
{
|
||||
private final FogRenderer fogRenderer;
|
||||
|
||||
protected FogEvent(FogRenderer fogRenderer, GameRenderer renderer, Entity entity, IBlockState state, IFluidState fluidState, double renderPartialTicks)
|
||||
|
||||
protected FogEvent(FogRenderer fogRenderer, GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks)
|
||||
{
|
||||
super(renderer, entity, state, fluidState, renderPartialTicks);
|
||||
super(renderer, info, renderPartialTicks);
|
||||
this.fogRenderer = fogRenderer;
|
||||
}
|
||||
|
||||
|
||||
public FogRenderer getFogRenderer() { return fogRenderer; }
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Event that allows any feature to customize the fog density the player sees.
|
||||
* NOTE: In order to make this event have an effect, you must cancel the event
|
||||
*/
|
||||
@@ -97,9 +84,9 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
|
||||
{
|
||||
private float density;
|
||||
|
||||
public FogDensity(FogRenderer fogRenderer, GameRenderer renderer, Entity entity, IBlockState state, IFluidState fluidState, double renderPartialTicks, float density)
|
||||
public FogDensity(FogRenderer fogRenderer, GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks, float density)
|
||||
{
|
||||
super(fogRenderer, renderer, entity, state, fluidState, renderPartialTicks);
|
||||
super(fogRenderer, renderer, info, renderPartialTicks);
|
||||
this.setDensity(density);
|
||||
}
|
||||
|
||||
@@ -123,9 +110,9 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
|
||||
private final int fogMode;
|
||||
private final float farPlaneDistance;
|
||||
|
||||
public RenderFogEvent(FogRenderer fogRenderer, GameRenderer renderer, Entity entity, IBlockState state, IFluidState fluidState, double renderPartialTicks, int fogMode, float farPlaneDistance)
|
||||
public RenderFogEvent(FogRenderer fogRenderer, GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks, int fogMode, float farPlaneDistance)
|
||||
{
|
||||
super(fogRenderer, renderer, entity, state, fluidState, renderPartialTicks);
|
||||
super(fogRenderer, renderer, info, renderPartialTicks);
|
||||
this.fogMode = fogMode;
|
||||
this.farPlaneDistance = farPlaneDistance;
|
||||
}
|
||||
@@ -146,14 +133,14 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
|
||||
* NOTE: Any change made to one of the color variables will affect the result seen in-game.
|
||||
*/
|
||||
public static class FogColors extends FogEvent
|
||||
{
|
||||
{
|
||||
private float red;
|
||||
private float green;
|
||||
private float blue;
|
||||
|
||||
public FogColors(FogRenderer fogRenderer, GameRenderer renderer, Entity entity, IBlockState state, IFluidState fluidState, double renderPartialTicks, float red, float green, float blue)
|
||||
public FogColors(FogRenderer fogRenderer, GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks, float red, float green, float blue)
|
||||
{
|
||||
super(fogRenderer, renderer, entity, state, fluidState, renderPartialTicks);
|
||||
super(fogRenderer, renderer, info, renderPartialTicks);
|
||||
this.setRed(red);
|
||||
this.setGreen(green);
|
||||
this.setBlue(blue);
|
||||
@@ -166,8 +153,8 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
|
||||
public float getBlue() { return blue; }
|
||||
public void setBlue(float blue) { this.blue = blue; }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Event that allows mods to alter the angles of the player's camera. Mainly useful for applying roll.
|
||||
*/
|
||||
public static class CameraSetup extends EntityViewRenderEvent
|
||||
@@ -176,9 +163,9 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
|
||||
private float pitch;
|
||||
private float roll;
|
||||
|
||||
public CameraSetup(GameRenderer renderer, Entity entity, IBlockState state, IFluidState fluidState, double renderPartialTicks, float yaw, float pitch, float roll)
|
||||
public CameraSetup(GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks, float yaw, float pitch, float roll)
|
||||
{
|
||||
super(renderer, entity, state, fluidState, renderPartialTicks);
|
||||
super(renderer, info, renderPartialTicks);
|
||||
this.setYaw(yaw);
|
||||
this.setPitch(pitch);
|
||||
this.setRoll(roll);
|
||||
@@ -191,7 +178,7 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
|
||||
public float getRoll() { return roll; }
|
||||
public void setRoll(float roll) { this.roll = roll; }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Event that allows mods to alter the raw FOV itself.
|
||||
* This directly affects to the FOV without being modified.
|
||||
@@ -199,9 +186,9 @@ public abstract class EntityViewRenderEvent extends net.minecraftforge.eventbus.
|
||||
public static class FOVModifier extends EntityViewRenderEvent
|
||||
{
|
||||
private double fov;
|
||||
|
||||
public FOVModifier(GameRenderer renderer, Entity entity, IBlockState state, IFluidState fluidState, double renderPartialTicks, double fov) {
|
||||
super(renderer, entity, state, fluidState, renderPartialTicks);
|
||||
|
||||
public FOVModifier(GameRenderer renderer, ActiveRenderInfo info, double renderPartialTicks, double fov) {
|
||||
super(renderer, info, renderPartialTicks);
|
||||
this.setFOV(fov);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
/**
|
||||
@@ -28,18 +28,18 @@ import net.minecraftforge.eventbus.api.Event;
|
||||
*/
|
||||
public class FOVUpdateEvent extends Event
|
||||
{
|
||||
private final EntityPlayer entity;
|
||||
private final PlayerEntity entity;
|
||||
private final float fov;
|
||||
private float newfov;
|
||||
|
||||
public FOVUpdateEvent(EntityPlayer entity, float fov)
|
||||
public FOVUpdateEvent(PlayerEntity entity, float fov)
|
||||
{
|
||||
this.entity = entity;
|
||||
this.fov = fov;
|
||||
this.setNewfov(fov);
|
||||
}
|
||||
|
||||
public EntityPlayer getEntity()
|
||||
public PlayerEntity getEntity()
|
||||
{
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
/**
|
||||
@@ -28,14 +28,14 @@ import net.minecraftforge.eventbus.api.Event;
|
||||
public class GuiContainerEvent extends Event
|
||||
{
|
||||
|
||||
private final GuiContainer guiContainer;
|
||||
private final ContainerScreen guiContainer;
|
||||
|
||||
public GuiContainerEvent(GuiContainer guiContainer)
|
||||
public GuiContainerEvent(ContainerScreen guiContainer)
|
||||
{
|
||||
this.guiContainer = guiContainer;
|
||||
}
|
||||
|
||||
public GuiContainer getGuiContainer()
|
||||
public ContainerScreen getGuiContainer()
|
||||
{
|
||||
return guiContainer;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class GuiContainerEvent extends Event
|
||||
* @param mouseX The current X position of the players mouse.
|
||||
* @param mouseY The current Y position of the players mouse.
|
||||
*/
|
||||
public DrawForeground(GuiContainer guiContainer, int mouseX, int mouseY)
|
||||
public DrawForeground(ContainerScreen guiContainer, int mouseX, int mouseY)
|
||||
{
|
||||
super(guiContainer);
|
||||
this.mouseX = mouseX;
|
||||
@@ -92,7 +92,7 @@ public class GuiContainerEvent extends Event
|
||||
* @param mouseX The current X position of the players mouse.
|
||||
* @param mouseY The current Y position of the players mouse.
|
||||
*/
|
||||
public DrawBackground(GuiContainer guiContainer, int mouseX, int mouseY)
|
||||
public DrawBackground(ContainerScreen guiContainer, int mouseX, int mouseY)
|
||||
{
|
||||
super(guiContainer);
|
||||
this.mouseX = mouseX;
|
||||
|
||||
@@ -21,7 +21,7 @@ package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
|
||||
/**
|
||||
* This event is called before any Gui will open.
|
||||
@@ -33,18 +33,18 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
public class GuiOpenEvent extends net.minecraftforge.eventbus.api.Event
|
||||
{
|
||||
private GuiScreen gui;
|
||||
public GuiOpenEvent(GuiScreen gui)
|
||||
private Screen gui;
|
||||
public GuiOpenEvent(Screen gui)
|
||||
{
|
||||
this.setGui(gui);
|
||||
}
|
||||
|
||||
public GuiScreen getGui()
|
||||
public Screen getGui()
|
||||
{
|
||||
return gui;
|
||||
}
|
||||
|
||||
public void setGui(GuiScreen gui)
|
||||
public void setGui(Screen gui)
|
||||
{
|
||||
this.gui = gui;
|
||||
}
|
||||
|
||||
@@ -26,12 +26,11 @@ import java.util.function.Consumer;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.IGuiEventListener;
|
||||
import net.minecraft.client.renderer.InventoryEffectRenderer;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.widget.Widget;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.util.InputMappings;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
@@ -47,9 +46,9 @@ import org.lwjgl.glfw.GLFW;
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class GuiScreenEvent extends Event
|
||||
{
|
||||
private final GuiScreen gui;
|
||||
private final Screen gui;
|
||||
|
||||
public GuiScreenEvent(GuiScreen gui)
|
||||
public GuiScreenEvent(Screen gui)
|
||||
{
|
||||
this.gui = gui;
|
||||
}
|
||||
@@ -57,42 +56,42 @@ public class GuiScreenEvent extends Event
|
||||
/**
|
||||
* The GuiScreen object generating this event.
|
||||
*/
|
||||
public GuiScreen getGui()
|
||||
public Screen getGui()
|
||||
{
|
||||
return gui;
|
||||
}
|
||||
|
||||
public static class InitGuiEvent extends GuiScreenEvent
|
||||
{
|
||||
private Consumer<GuiButton> addButton;
|
||||
private Consumer<GuiButton> removeButton;
|
||||
private Consumer<Widget> add;
|
||||
private Consumer<Widget> remove;
|
||||
|
||||
private List<GuiButton> buttonList;
|
||||
private List<Widget> list;
|
||||
|
||||
public InitGuiEvent(GuiScreen gui, List<GuiButton> buttonList, Consumer<GuiButton> addButton, Consumer<GuiButton> removeButton)
|
||||
public InitGuiEvent(Screen gui, List<Widget> list, Consumer<Widget> add, Consumer<Widget> remove)
|
||||
{
|
||||
super(gui);
|
||||
this.buttonList = Collections.unmodifiableList(buttonList);
|
||||
this.addButton = addButton;
|
||||
this.removeButton = removeButton;
|
||||
this.list = Collections.unmodifiableList(list);
|
||||
this.add = add;
|
||||
this.remove = remove;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unmodifiable reference to the list of buttons on the {@link #gui}.
|
||||
*/
|
||||
public List<GuiButton> getButtonList()
|
||||
public List<Widget> getWidgetList()
|
||||
{
|
||||
return buttonList;
|
||||
return list;
|
||||
}
|
||||
|
||||
public void addButton(GuiButton button)
|
||||
public void addWidget(Widget button)
|
||||
{
|
||||
addButton.accept(button);
|
||||
add.accept(button);
|
||||
}
|
||||
|
||||
public void removeButton(GuiButton button)
|
||||
public void removeWidget(Widget button)
|
||||
{
|
||||
removeButton.accept(button);
|
||||
remove.accept(button);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,9 +106,9 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends InitGuiEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, List<GuiButton> buttonList, Consumer<GuiButton> addButton, Consumer<GuiButton> removeButton)
|
||||
public Pre(Screen gui, List<Widget> list, Consumer<Widget> add, Consumer<Widget> remove)
|
||||
{
|
||||
super(gui, buttonList, addButton, removeButton);
|
||||
super(gui, list, add, remove);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,9 +118,9 @@ public class GuiScreenEvent extends Event
|
||||
*/
|
||||
public static class Post extends InitGuiEvent
|
||||
{
|
||||
public Post(GuiScreen gui, List<GuiButton> buttonList, Consumer<GuiButton> addButton, Consumer<GuiButton> removeButton)
|
||||
public Post(Screen gui, List<Widget> list, Consumer<Widget> add, Consumer<Widget> remove)
|
||||
{
|
||||
super(gui, buttonList, addButton, removeButton);
|
||||
super(gui, list, add, remove);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,7 +131,7 @@ public class GuiScreenEvent extends Event
|
||||
private final int mouseY;
|
||||
private final float renderPartialTicks;
|
||||
|
||||
public DrawScreenEvent(GuiScreen gui, int mouseX, int mouseY, float renderPartialTicks)
|
||||
public DrawScreenEvent(Screen gui, int mouseX, int mouseY, float renderPartialTicks)
|
||||
{
|
||||
super(gui);
|
||||
this.mouseX = mouseX;
|
||||
@@ -171,7 +170,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends DrawScreenEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, int mouseX, int mouseY, float renderPartialTicks)
|
||||
public Pre(Screen gui, int mouseX, int mouseY, float renderPartialTicks)
|
||||
{
|
||||
super(gui, mouseX, mouseY, renderPartialTicks);
|
||||
}
|
||||
@@ -182,7 +181,7 @@ public class GuiScreenEvent extends Event
|
||||
*/
|
||||
public static class Post extends DrawScreenEvent
|
||||
{
|
||||
public Post(GuiScreen gui, int mouseX, int mouseY, float renderPartialTicks)
|
||||
public Post(Screen gui, int mouseX, int mouseY, float renderPartialTicks)
|
||||
{
|
||||
super(gui, mouseX, mouseY, renderPartialTicks);
|
||||
}
|
||||
@@ -195,7 +194,7 @@ public class GuiScreenEvent extends Event
|
||||
*/
|
||||
public static class BackgroundDrawnEvent extends GuiScreenEvent
|
||||
{
|
||||
public BackgroundDrawnEvent(GuiScreen gui)
|
||||
public BackgroundDrawnEvent(Screen gui)
|
||||
{
|
||||
super(gui);
|
||||
}
|
||||
@@ -209,7 +208,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class PotionShiftEvent extends GuiScreenEvent
|
||||
{
|
||||
public PotionShiftEvent(GuiScreen gui)
|
||||
public PotionShiftEvent(Screen gui)
|
||||
{
|
||||
super(gui);
|
||||
}
|
||||
@@ -217,25 +216,25 @@ public class GuiScreenEvent extends Event
|
||||
|
||||
public static class ActionPerformedEvent extends GuiScreenEvent
|
||||
{
|
||||
private GuiButton button;
|
||||
private List<GuiButton> buttonList;
|
||||
private Button button;
|
||||
private List<Button> buttonList;
|
||||
|
||||
public ActionPerformedEvent(GuiScreen gui, GuiButton button, List<GuiButton> buttonList)
|
||||
public ActionPerformedEvent(Screen gui, Button button, List<Button> buttonList)
|
||||
{
|
||||
super(gui);
|
||||
this.setButton(button);
|
||||
this.setButtonList(new ArrayList<GuiButton>(buttonList));
|
||||
this.setButtonList(new ArrayList<Button>(buttonList));
|
||||
}
|
||||
|
||||
/**
|
||||
* The button that was clicked.
|
||||
*/
|
||||
public GuiButton getButton()
|
||||
public Button getButton()
|
||||
{
|
||||
return button;
|
||||
}
|
||||
|
||||
public void setButton(GuiButton button)
|
||||
public void setButton(Button button)
|
||||
{
|
||||
this.button = button;
|
||||
}
|
||||
@@ -243,12 +242,12 @@ public class GuiScreenEvent extends Event
|
||||
/**
|
||||
* A COPY of the {@link #buttonList} field from the GuiScreen referenced by {@link #gui}.
|
||||
*/
|
||||
public List<GuiButton> getButtonList()
|
||||
public List<Button> getButtonList()
|
||||
{
|
||||
return buttonList;
|
||||
}
|
||||
|
||||
public void setButtonList(List<GuiButton> buttonList)
|
||||
public void setButtonList(List<Button> buttonList)
|
||||
{
|
||||
this.buttonList = buttonList;
|
||||
}
|
||||
@@ -261,7 +260,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends ActionPerformedEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, GuiButton button, List<GuiButton> buttonList)
|
||||
public Pre(Screen gui, Button button, List<Button> buttonList)
|
||||
{
|
||||
super(gui, button, buttonList);
|
||||
}
|
||||
@@ -273,7 +272,7 @@ public class GuiScreenEvent extends Event
|
||||
*/
|
||||
public static class Post extends ActionPerformedEvent
|
||||
{
|
||||
public Post(GuiScreen gui, GuiButton button, List<GuiButton> buttonList)
|
||||
public Post(Screen gui, Button button, List<Button> buttonList)
|
||||
{
|
||||
super(gui, button, buttonList);
|
||||
}
|
||||
@@ -285,7 +284,7 @@ public class GuiScreenEvent extends Event
|
||||
private final double mouseX;
|
||||
private final double mouseY;
|
||||
|
||||
public MouseInputEvent(GuiScreen gui, double mouseX, double mouseY)
|
||||
public MouseInputEvent(Screen gui, double mouseX, double mouseY)
|
||||
{
|
||||
super(gui);
|
||||
this.mouseX = mouseX;
|
||||
@@ -307,7 +306,7 @@ public class GuiScreenEvent extends Event
|
||||
{
|
||||
private final int button;
|
||||
|
||||
public MouseClickedEvent(GuiScreen gui, double mouseX, double mouseY, int button)
|
||||
public MouseClickedEvent(Screen gui, double mouseX, double mouseY, int button)
|
||||
{
|
||||
super(gui, mouseX, mouseY);
|
||||
this.button = button;
|
||||
@@ -325,7 +324,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends MouseClickedEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, double mouseX, double mouseY, int button)
|
||||
public Pre(Screen gui, double mouseX, double mouseY, int button)
|
||||
{
|
||||
super(gui, mouseX, mouseY, button);
|
||||
}
|
||||
@@ -338,7 +337,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Post extends MouseClickedEvent
|
||||
{
|
||||
public Post(GuiScreen gui, double mouseX, double mouseY, int button)
|
||||
public Post(Screen gui, double mouseX, double mouseY, int button)
|
||||
{
|
||||
super(gui, mouseX, mouseY, button);
|
||||
}
|
||||
@@ -349,7 +348,7 @@ public class GuiScreenEvent extends Event
|
||||
{
|
||||
private final int button;
|
||||
|
||||
public MouseReleasedEvent(GuiScreen gui, double mouseX, double mouseY, int button)
|
||||
public MouseReleasedEvent(Screen gui, double mouseX, double mouseY, int button)
|
||||
{
|
||||
super(gui, mouseX, mouseY);
|
||||
this.button = button;
|
||||
@@ -367,7 +366,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends MouseReleasedEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, double mouseX, double mouseY, int button)
|
||||
public Pre(Screen gui, double mouseX, double mouseY, int button)
|
||||
{
|
||||
super(gui, mouseX, mouseY, button);
|
||||
}
|
||||
@@ -380,7 +379,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Post extends MouseReleasedEvent
|
||||
{
|
||||
public Post(GuiScreen gui, double mouseX, double mouseY, int button)
|
||||
public Post(Screen gui, double mouseX, double mouseY, int button)
|
||||
{
|
||||
super(gui, mouseX, mouseY, button);
|
||||
}
|
||||
@@ -393,7 +392,7 @@ public class GuiScreenEvent extends Event
|
||||
private final double dragX;
|
||||
private final double dragY;
|
||||
|
||||
public MouseDragEvent(GuiScreen gui, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
|
||||
public MouseDragEvent(Screen gui, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
|
||||
{
|
||||
super(gui, mouseX, mouseY);
|
||||
this.mouseButton = mouseButton;
|
||||
@@ -423,7 +422,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends MouseDragEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
|
||||
public Pre(Screen gui, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
|
||||
{
|
||||
super(gui, mouseX, mouseY, mouseButton, dragX, dragY);
|
||||
}
|
||||
@@ -436,7 +435,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Post extends MouseDragEvent
|
||||
{
|
||||
public Post(GuiScreen gui, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
|
||||
public Post(Screen gui, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
|
||||
{
|
||||
super(gui, mouseX, mouseY, mouseButton, dragX, dragY);
|
||||
}
|
||||
@@ -447,7 +446,7 @@ public class GuiScreenEvent extends Event
|
||||
{
|
||||
private final double scrollDelta;
|
||||
|
||||
public MouseScrollEvent(GuiScreen gui, double mouseX, double mouseY, double scrollDelta)
|
||||
public MouseScrollEvent(Screen gui, double mouseX, double mouseY, double scrollDelta)
|
||||
{
|
||||
super(gui, mouseX, mouseY);
|
||||
this.scrollDelta = scrollDelta;
|
||||
@@ -465,7 +464,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends MouseScrollEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, double mouseX, double mouseY, double scrollDelta)
|
||||
public Pre(Screen gui, double mouseX, double mouseY, double scrollDelta)
|
||||
{
|
||||
super(gui, mouseX, mouseY, scrollDelta);
|
||||
}
|
||||
@@ -478,7 +477,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Post extends MouseScrollEvent
|
||||
{
|
||||
public Post(GuiScreen gui, double mouseX, double mouseY, double scrollDelta)
|
||||
public Post(Screen gui, double mouseX, double mouseY, double scrollDelta)
|
||||
{
|
||||
super(gui, mouseX, mouseY, scrollDelta);
|
||||
}
|
||||
@@ -491,7 +490,7 @@ public class GuiScreenEvent extends Event
|
||||
private final int scanCode;
|
||||
private final int modifiers;
|
||||
|
||||
public KeyboardKeyEvent(GuiScreen gui, int keyCode, int scanCode, int modifiers)
|
||||
public KeyboardKeyEvent(Screen gui, int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
super(gui);
|
||||
this.keyCode = keyCode;
|
||||
@@ -540,7 +539,7 @@ public class GuiScreenEvent extends Event
|
||||
|
||||
public static abstract class KeyboardKeyPressedEvent extends KeyboardKeyEvent
|
||||
{
|
||||
public KeyboardKeyPressedEvent(GuiScreen gui, int keyCode, int scanCode, int modifiers)
|
||||
public KeyboardKeyPressedEvent(Screen gui, int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
super(gui, keyCode, scanCode, modifiers);
|
||||
}
|
||||
@@ -552,7 +551,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends KeyboardKeyPressedEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, int keyCode, int scanCode, int modifiers)
|
||||
public Pre(Screen gui, int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
super(gui, keyCode, scanCode, modifiers);
|
||||
}
|
||||
@@ -565,7 +564,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Post extends KeyboardKeyPressedEvent
|
||||
{
|
||||
public Post(GuiScreen gui, int keyCode, int scanCode, int modifiers)
|
||||
public Post(Screen gui, int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
super(gui, keyCode, scanCode, modifiers);
|
||||
}
|
||||
@@ -574,7 +573,7 @@ public class GuiScreenEvent extends Event
|
||||
|
||||
public static abstract class KeyboardKeyReleasedEvent extends KeyboardKeyEvent
|
||||
{
|
||||
public KeyboardKeyReleasedEvent(GuiScreen gui, int keyCode, int scanCode, int modifiers)
|
||||
public KeyboardKeyReleasedEvent(Screen gui, int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
super(gui, keyCode, scanCode, modifiers);
|
||||
}
|
||||
@@ -586,7 +585,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends KeyboardKeyReleasedEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, int keyCode, int scanCode, int modifiers)
|
||||
public Pre(Screen gui, int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
super(gui, keyCode, scanCode, modifiers);
|
||||
}
|
||||
@@ -599,7 +598,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Post extends KeyboardKeyReleasedEvent
|
||||
{
|
||||
public Post(GuiScreen gui, int keyCode, int scanCode, int modifiers)
|
||||
public Post(Screen gui, int keyCode, int scanCode, int modifiers)
|
||||
{
|
||||
super(gui, keyCode, scanCode, modifiers);
|
||||
}
|
||||
@@ -611,7 +610,7 @@ public class GuiScreenEvent extends Event
|
||||
private final char codePoint;
|
||||
private final int modifiers;
|
||||
|
||||
public KeyboardCharTypedEvent(GuiScreen gui, char codePoint, int modifiers)
|
||||
public KeyboardCharTypedEvent(Screen gui, char codePoint, int modifiers)
|
||||
{
|
||||
super(gui);
|
||||
this.codePoint = codePoint;
|
||||
@@ -646,7 +645,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Pre extends KeyboardCharTypedEvent
|
||||
{
|
||||
public Pre(GuiScreen gui, char codePoint, int modifiers)
|
||||
public Pre(Screen gui, char codePoint, int modifiers)
|
||||
{
|
||||
super(gui, codePoint, modifiers);
|
||||
}
|
||||
@@ -659,7 +658,7 @@ public class GuiScreenEvent extends Event
|
||||
@Cancelable
|
||||
public static class Post extends KeyboardCharTypedEvent
|
||||
{
|
||||
public Post(GuiScreen gui, char codePoint, int modifiers)
|
||||
public Post(Screen gui, char codePoint, int modifiers)
|
||||
{
|
||||
super(gui, codePoint, modifiers);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.MovementInput;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class InputUpdateEvent extends PlayerEvent
|
||||
{
|
||||
private final MovementInput movementInput;
|
||||
|
||||
public InputUpdateEvent(EntityPlayer player, MovementInput movementInput)
|
||||
public InputUpdateEvent(PlayerEntity player, MovementInput movementInput)
|
||||
{
|
||||
super(player);
|
||||
this.movementInput = movementInput;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
@@ -36,7 +36,7 @@ public class PlayerSPPushOutOfBlocksEvent extends PlayerEvent
|
||||
{
|
||||
private AxisAlignedBB entityBoundingBox;
|
||||
|
||||
public PlayerSPPushOutOfBlocksEvent(EntityPlayer player, AxisAlignedBB entityBoundingBox)
|
||||
public PlayerSPPushOutOfBlocksEvent(PlayerEntity player, AxisAlignedBB entityBoundingBox)
|
||||
{
|
||||
super(player);
|
||||
this.entityBoundingBox = entityBoundingBox;
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
@@ -37,13 +37,13 @@ public class RenderBlockOverlayEvent extends net.minecraftforge.eventbus.api.Eve
|
||||
FIRE, BLOCK, WATER
|
||||
}
|
||||
|
||||
private final EntityPlayer player;
|
||||
private final PlayerEntity player;
|
||||
private final float renderPartialTicks;
|
||||
private final OverlayType overlayType;
|
||||
private final IBlockState blockForOverlay;
|
||||
private final BlockState blockForOverlay;
|
||||
private final BlockPos blockPos;
|
||||
|
||||
public RenderBlockOverlayEvent(EntityPlayer player, float renderPartialTicks, OverlayType type, IBlockState block, BlockPos blockPos)
|
||||
public RenderBlockOverlayEvent(PlayerEntity player, float renderPartialTicks, OverlayType type, BlockState block, BlockPos blockPos)
|
||||
{
|
||||
this.player = player;
|
||||
this.renderPartialTicks = renderPartialTicks;
|
||||
@@ -56,7 +56,7 @@ public class RenderBlockOverlayEvent extends net.minecraftforge.eventbus.api.Eve
|
||||
/**
|
||||
* The player which the overlay will apply to
|
||||
*/
|
||||
public EntityPlayer getPlayer() { return player; }
|
||||
public PlayerEntity getPlayer() { return player; }
|
||||
public float getRenderPartialTicks() { return renderPartialTicks; }
|
||||
/**
|
||||
* The type of overlay to occur
|
||||
@@ -65,6 +65,6 @@ public class RenderBlockOverlayEvent extends net.minecraftforge.eventbus.api.Eve
|
||||
/**
|
||||
* If the overlay type is BLOCK, then this is the block which the overlay is getting it's icon from
|
||||
*/
|
||||
public IBlockState getBlockForOverlay() { return blockForOverlay; }
|
||||
public BlockState getBlockForOverlay() { return blockForOverlay; }
|
||||
public BlockPos getBlockPos() { return blockPos; }
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import java.util.ArrayList;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraft.client.MainWindow;
|
||||
import net.minecraft.client.gui.BossInfoClient;
|
||||
import net.minecraft.client.gui.ClientBossInfo;
|
||||
|
||||
@Cancelable
|
||||
public class RenderGameOverlayEvent extends Event
|
||||
@@ -99,11 +99,11 @@ public class RenderGameOverlayEvent extends Event
|
||||
|
||||
public static class BossInfo extends Pre
|
||||
{
|
||||
private final BossInfoClient bossInfo;
|
||||
private final ClientBossInfo bossInfo;
|
||||
private final int x;
|
||||
private final int y;
|
||||
private int increment;
|
||||
public BossInfo(RenderGameOverlayEvent parent, ElementType type, BossInfoClient bossInfo, int x, int y, int increment)
|
||||
public BossInfo(RenderGameOverlayEvent parent, ElementType type, ClientBossInfo bossInfo, int x, int y, int increment)
|
||||
{
|
||||
super(parent, type);
|
||||
this.bossInfo = bossInfo;
|
||||
@@ -115,7 +115,7 @@ public class RenderGameOverlayEvent extends Event
|
||||
/**
|
||||
* @return The {@link BossInfoClient} currently being rendered
|
||||
*/
|
||||
public BossInfoClient getBossInfo()
|
||||
public ClientBossInfo getBossInfo()
|
||||
{
|
||||
return bossInfo;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItemFrame;
|
||||
import net.minecraft.entity.item.EntityItemFrame;
|
||||
import net.minecraft.client.renderer.entity.ItemFrameRenderer;
|
||||
import net.minecraft.entity.item.ItemFrameEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
@@ -36,10 +36,10 @@ import javax.annotation.Nonnull;
|
||||
public class RenderItemInFrameEvent extends net.minecraftforge.eventbus.api.Event
|
||||
{
|
||||
private final ItemStack item;
|
||||
private final EntityItemFrame entityItemFrame;
|
||||
private final RenderItemFrame renderer;
|
||||
private final ItemFrameEntity entityItemFrame;
|
||||
private final ItemFrameRenderer renderer;
|
||||
|
||||
public RenderItemInFrameEvent(EntityItemFrame itemFrame, RenderItemFrame renderItemFrame)
|
||||
public RenderItemInFrameEvent(ItemFrameEntity itemFrame, ItemFrameRenderer renderItemFrame)
|
||||
{
|
||||
item = itemFrame.getDisplayedItem();
|
||||
entityItemFrame = itemFrame;
|
||||
@@ -52,12 +52,12 @@ public class RenderItemInFrameEvent extends net.minecraftforge.eventbus.api.Even
|
||||
return item;
|
||||
}
|
||||
|
||||
public EntityItemFrame getEntityItemFrame()
|
||||
public ItemFrameEntity getEntityItemFrame()
|
||||
{
|
||||
return entityItemFrame;
|
||||
}
|
||||
|
||||
public RenderItemFrame getRenderer()
|
||||
public ItemFrameRenderer getRenderer()
|
||||
{
|
||||
return renderer;
|
||||
}
|
||||
|
||||
@@ -21,19 +21,20 @@ package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraft.client.renderer.entity.RenderLivingBase;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.client.renderer.entity.LivingRenderer;
|
||||
import net.minecraft.client.renderer.entity.model.EntityModel;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
|
||||
public abstract class RenderLivingEvent<T extends EntityLivingBase> extends net.minecraftforge.eventbus.api.Event
|
||||
public abstract class RenderLivingEvent<T extends LivingEntity, M extends EntityModel<T>> extends Event
|
||||
{
|
||||
private final EntityLivingBase entity;
|
||||
private final RenderLivingBase<T> renderer;
|
||||
private final LivingEntity entity;
|
||||
private final LivingRenderer<T, M> renderer;
|
||||
private final float partialRenderTick;
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final double z;
|
||||
|
||||
public RenderLivingEvent(EntityLivingBase entity, RenderLivingBase<T> renderer, float partialRenderTick, double x, double y, double z)
|
||||
public RenderLivingEvent(LivingEntity entity, LivingRenderer<T, M> renderer, float partialRenderTick, double x, double y, double z)
|
||||
{
|
||||
this.entity = entity;
|
||||
this.renderer = renderer;
|
||||
@@ -43,35 +44,35 @@ public abstract class RenderLivingEvent<T extends EntityLivingBase> extends net.
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public EntityLivingBase getEntity() { return entity; }
|
||||
public RenderLivingBase<T> getRenderer() { return renderer; }
|
||||
public LivingEntity getEntity() { return entity; }
|
||||
public LivingRenderer<T, M> getRenderer() { return renderer; }
|
||||
public float getPartialRenderTick() { return partialRenderTick; }
|
||||
public double getX() { return x; }
|
||||
public double getY() { return y; }
|
||||
public double getZ() { return z; }
|
||||
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
public static class Pre<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
||||
@Cancelable
|
||||
public static class Pre<T extends LivingEntity, M extends EntityModel<T>> extends RenderLivingEvent<T, M>
|
||||
{
|
||||
public Pre(EntityLivingBase entity, RenderLivingBase<T> renderer, float partialRenderTick, double x, double y, double z){ super(entity, renderer, partialRenderTick, x, y, z); }
|
||||
public Pre(LivingEntity entity, LivingRenderer<T, M> renderer, float partialRenderTick, double x, double y, double z){ super(entity, renderer, partialRenderTick, x, y, z); }
|
||||
}
|
||||
public static class Post<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
||||
public static class Post<T extends LivingEntity, M extends EntityModel<T>> extends RenderLivingEvent<T, M>
|
||||
{
|
||||
public Post(EntityLivingBase entity, RenderLivingBase<T> renderer, float partialRenderTick, double x, double y, double z){ super(entity, renderer, partialRenderTick, x, y, z); }
|
||||
public Post(LivingEntity entity, LivingRenderer<T, M> renderer, float partialRenderTick, double x, double y, double z){ super(entity, renderer, partialRenderTick, x, y, z); }
|
||||
}
|
||||
|
||||
public abstract static class Specials<T extends EntityLivingBase> extends RenderLivingEvent<T>
|
||||
public abstract static class Specials<T extends LivingEntity, M extends EntityModel<T>> extends RenderLivingEvent<T, M>
|
||||
{
|
||||
public Specials(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, 0, x, y, z); }
|
||||
public Specials(LivingEntity entity, LivingRenderer<T, M> renderer, double x, double y, double z){ super(entity, renderer, 0, x, y, z); }
|
||||
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
public static class Pre<T extends EntityLivingBase> extends Specials<T>
|
||||
@Cancelable
|
||||
public static class Pre<T extends LivingEntity, M extends EntityModel<T>> extends Specials<T, M>
|
||||
{
|
||||
public Pre(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
public Pre(LivingEntity entity, LivingRenderer<T, M> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
}
|
||||
public static class Post<T extends EntityLivingBase> extends Specials<T>
|
||||
public static class Post<T extends LivingEntity, M extends EntityModel<T>> extends Specials<T, M>
|
||||
{
|
||||
public Post(EntityLivingBase entity, RenderLivingBase<T> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
public Post(LivingEntity entity, LivingRenderer<T, M> renderer, double x, double y, double z){ super(entity, renderer, x, y, z); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,8 @@
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.client.renderer.entity.PlayerRenderer;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
|
||||
@@ -29,13 +29,13 @@ import javax.annotation.Nonnull;
|
||||
|
||||
public abstract class RenderPlayerEvent extends PlayerEvent
|
||||
{
|
||||
private final RenderPlayer renderer;
|
||||
private final PlayerRenderer renderer;
|
||||
private final float partialRenderTick;
|
||||
private final double x;
|
||||
private final double y;
|
||||
private final double z;
|
||||
|
||||
public RenderPlayerEvent(EntityPlayer player, RenderPlayer renderer, float partialRenderTick, double x, double y, double z)
|
||||
public RenderPlayerEvent(PlayerEntity player, PlayerRenderer renderer, float partialRenderTick, double x, double y, double z)
|
||||
{
|
||||
super(player);
|
||||
this.renderer = renderer;
|
||||
@@ -45,7 +45,7 @@ public abstract class RenderPlayerEvent extends PlayerEvent
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public RenderPlayer getRenderer() { return renderer; }
|
||||
public PlayerRenderer getRenderer() { return renderer; }
|
||||
public float getPartialRenderTick() { return partialRenderTick; }
|
||||
public double getX() { return x; }
|
||||
public double getY() { return y; }
|
||||
@@ -54,12 +54,12 @@ public abstract class RenderPlayerEvent extends PlayerEvent
|
||||
@net.minecraftforge.eventbus.api.Cancelable
|
||||
public static class Pre extends RenderPlayerEvent
|
||||
{
|
||||
public Pre(EntityPlayer player, RenderPlayer renderer, float tick, double x, double y, double z){ super(player, renderer, tick, x, y, z); }
|
||||
public Pre(PlayerEntity player, PlayerRenderer renderer, float tick, double x, double y, double z){ super(player, renderer, tick, x, y, z); }
|
||||
}
|
||||
|
||||
public static class Post extends RenderPlayerEvent
|
||||
{
|
||||
public Post(EntityPlayer player, RenderPlayer renderer, float tick, double x, double y, double z){ super(player, renderer, tick, x, y, z); }
|
||||
public Post(PlayerEntity player, PlayerRenderer renderer, float tick, double x, double y, double z){ super(player, renderer, tick, x, y, z); }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
@@ -35,7 +35,7 @@ import javax.annotation.Nonnull;
|
||||
@Cancelable
|
||||
public class RenderSpecificHandEvent extends Event
|
||||
{
|
||||
private final EnumHand hand;
|
||||
private final Hand hand;
|
||||
private final float partialTicks;
|
||||
private final float interpolatedPitch;
|
||||
private final float swingProgress;
|
||||
@@ -43,7 +43,7 @@ public class RenderSpecificHandEvent extends Event
|
||||
@Nonnull
|
||||
private final ItemStack stack;
|
||||
|
||||
public RenderSpecificHandEvent(EnumHand hand, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, @Nonnull ItemStack stack)
|
||||
public RenderSpecificHandEvent(Hand hand, float partialTicks, float interpolatedPitch, float swingProgress, float equipProgress, @Nonnull ItemStack stack)
|
||||
{
|
||||
this.hand = hand;
|
||||
this.partialTicks = partialTicks;
|
||||
@@ -53,7 +53,7 @@ public class RenderSpecificHandEvent extends Event
|
||||
this.stack = stack;
|
||||
}
|
||||
|
||||
public EnumHand getHand()
|
||||
public Hand getHand()
|
||||
{
|
||||
return hand;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraft.client.renderer.texture.NativeImage;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraftforge.eventbus.api.Cancelable;
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
|
||||
@@ -40,7 +40,7 @@ import java.io.File;
|
||||
public class ScreenshotEvent extends Event
|
||||
{
|
||||
|
||||
public static final ITextComponent DEFAULT_CANCEL_REASON = new TextComponentString("Screenshot canceled");
|
||||
public static final ITextComponent DEFAULT_CANCEL_REASON = new StringTextComponent("Screenshot canceled");
|
||||
|
||||
private NativeImage image;
|
||||
private File screenshotFile;
|
||||
|
||||
@@ -20,19 +20,19 @@
|
||||
package net.minecraftforge.client.event;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.texture.AtlasTexture;
|
||||
|
||||
|
||||
public class TextureStitchEvent extends Event
|
||||
{
|
||||
private final TextureMap map;
|
||||
private final AtlasTexture map;
|
||||
|
||||
public TextureStitchEvent(TextureMap map)
|
||||
public TextureStitchEvent(AtlasTexture map)
|
||||
{
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
public TextureMap getMap()
|
||||
public AtlasTexture getMap()
|
||||
{
|
||||
return map;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public class TextureStitchEvent extends Event
|
||||
*/
|
||||
public static class Pre extends TextureStitchEvent
|
||||
{
|
||||
public Pre(TextureMap map){ super(map); }
|
||||
public Pre(AtlasTexture map){ super(map); }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,6 +54,6 @@ public class TextureStitchEvent extends Event
|
||||
*/
|
||||
public static class Post extends TextureStitchEvent
|
||||
{
|
||||
public Post(TextureMap map){ super(map); }
|
||||
public Post(AtlasTexture map){ super(map); }
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
package net.minecraftforge.client.event.sound;
|
||||
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.client.audio.SoundEngine;
|
||||
|
||||
/***
|
||||
* Raised when the SoundManager tries to play a normal sound.
|
||||
@@ -34,7 +34,7 @@ public class PlaySoundEvent extends SoundEvent
|
||||
private final ISound sound;
|
||||
private ISound result;
|
||||
|
||||
public PlaySoundEvent(SoundManager manager, ISound sound)
|
||||
public PlaySoundEvent(SoundEngine manager, ISound sound)
|
||||
{
|
||||
super(manager);
|
||||
this.sound = sound;
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
package net.minecraftforge.client.event.sound;
|
||||
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.client.audio.SoundEngine;
|
||||
import net.minecraft.client.audio.SoundSource;
|
||||
import net.minecraftforge.client.event.sound.SoundEvent.SoundSourceEvent;
|
||||
|
||||
public class PlaySoundSourceEvent extends SoundSourceEvent
|
||||
{
|
||||
public PlaySoundSourceEvent(SoundManager manager, ISound sound, String uuid)
|
||||
public PlaySoundSourceEvent(SoundEngine manager, ISound sound, SoundSource source)
|
||||
{
|
||||
super(manager, sound, uuid);
|
||||
super(manager, sound, source);
|
||||
}
|
||||
}
|
||||
@@ -20,13 +20,14 @@
|
||||
package net.minecraftforge.client.event.sound;
|
||||
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.client.audio.SoundEngine;
|
||||
import net.minecraft.client.audio.SoundSource;
|
||||
import net.minecraftforge.client.event.sound.SoundEvent.SoundSourceEvent;
|
||||
|
||||
public class PlayStreamingSourceEvent extends SoundSourceEvent
|
||||
{
|
||||
public PlayStreamingSourceEvent(SoundManager manager, ISound sound, String uuid)
|
||||
public PlayStreamingSourceEvent(SoundEngine manager, ISound sound, SoundSource source)
|
||||
{
|
||||
super(manager, sound, uuid);
|
||||
super(manager, sound, source);
|
||||
}
|
||||
}
|
||||
@@ -21,17 +21,18 @@ package net.minecraftforge.client.event.sound;
|
||||
|
||||
import net.minecraftforge.eventbus.api.Event;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.client.audio.SoundEngine;
|
||||
import net.minecraft.client.audio.SoundSource;
|
||||
|
||||
public class SoundEvent extends net.minecraftforge.eventbus.api.Event
|
||||
{
|
||||
private final SoundManager manager;
|
||||
public SoundEvent(SoundManager manager)
|
||||
private final SoundEngine manager;
|
||||
public SoundEvent(SoundEngine manager)
|
||||
{
|
||||
this.manager = manager;
|
||||
}
|
||||
|
||||
public SoundManager getManager()
|
||||
public SoundEngine getManager()
|
||||
{
|
||||
return manager;
|
||||
}
|
||||
@@ -39,15 +40,15 @@ public class SoundEvent extends net.minecraftforge.eventbus.api.Event
|
||||
public static class SoundSourceEvent extends SoundEvent
|
||||
{
|
||||
private final ISound sound;
|
||||
private final String uuid;
|
||||
private final SoundSource source;
|
||||
private final String name;
|
||||
|
||||
public SoundSourceEvent(SoundManager manager, ISound sound, String uuid)
|
||||
public SoundSourceEvent(SoundEngine manager, ISound sound, SoundSource source)
|
||||
{
|
||||
super(manager);
|
||||
this.name = sound.getSoundLocation().getPath();
|
||||
this.sound = sound;
|
||||
this.uuid = uuid;
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public ISound getSound()
|
||||
@@ -55,9 +56,9 @@ public class SoundEvent extends net.minecraftforge.eventbus.api.Event
|
||||
return sound;
|
||||
}
|
||||
|
||||
public String getUuid()
|
||||
public SoundSource getSource()
|
||||
{
|
||||
return uuid;
|
||||
return source;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package net.minecraftforge.client.event.sound;
|
||||
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.client.audio.SoundEngine;
|
||||
|
||||
/**
|
||||
* Raised by the SoundManager.loadSoundSettings, this would be a good place for
|
||||
@@ -27,7 +27,7 @@ import net.minecraft.client.audio.SoundManager;
|
||||
*/
|
||||
public class SoundLoadEvent extends SoundEvent
|
||||
{
|
||||
public SoundLoadEvent(SoundManager manager)
|
||||
public SoundLoadEvent(SoundEngine manager)
|
||||
{
|
||||
super(manager);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package net.minecraftforge.client.event.sound;
|
||||
|
||||
import net.minecraft.client.audio.SoundManager;
|
||||
import net.minecraft.client.audio.SoundEngine;
|
||||
|
||||
/**
|
||||
* This event is raised by the SoundManager when it does its first setup of the
|
||||
@@ -27,7 +27,7 @@ import net.minecraft.client.audio.SoundManager;
|
||||
*/
|
||||
public class SoundSetupEvent extends SoundEvent
|
||||
{
|
||||
public SoundSetupEvent(SoundManager manager)
|
||||
public SoundSetupEvent(SoundEngine manager)
|
||||
{
|
||||
super(manager);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user