- 89
- 2
Java:
package ru.theklimot.npc.gui;
import java.io.IOException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.ResourceLocation;
import ru.theklimot.npc.Main;
public class SkolGui extends GuiScreen {
private final int guiHeight = 120;
private final int guiWidth = 256;
private static ResourceLocation guiTexture;
public static Object instance;
public SkolGui() {
guiTexture = new ResourceLocation(Main.MODID+ ":textures/gui/skolgui.png");
}
private String formatString(String s) {
return s.replace("NL", "\n\n");
}
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
}
@Override
public void updateScreen() {
super.updateScreen();
}
@Override
public void drawScreen(int w, int h, float p_73863_3_) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
mc.getTextureManager().bindTexture(guiTexture);
int offsetFromScreenLeft = (width - guiWidth) / 2;
fontRenderer.drawString("БУДЬТЕ ОСТОРОЖНЫ!", offsetFromScreenLeft + guiWidth - 50, 170, 0);
}
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
super.mouseClicked(mouseX, mouseY, mouseButton);
}
public void onGuiClose() {
Keyboard.enableRepeatEvents(false);
}
@Override
public boolean doesGuiPauseGame() {
return false;
}
}
Java:
package ru.theklimot.npc.gui;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.registry.EntityEntry;
import ru.theklimot.npc.mobs.EntityRegistry;
import ru.theklimot.npc.mobs.EntitySmallHerobrine;
import scala.reflect.internal.Trees.New;
public class OpenGuiMobs extends EntityRegistry {
public void opengui(PlayerInteractEvent.EntityInteract event) {
Entity entity = event.getEntity();
EntityPlayer p = event.getEntityPlayer();
if (entity instanceof EntityLivingBase) {
return;
}
}
}