Optimize Imports

This commit is contained in:
Kam committed 2024-02-15 17:54:28 -05:00
1 parent ec78673fa2
commit e46b78ff71
149 files changed
+931 -1029

No files matched your search

+4 -3
View File
@@ -1,14 +1,15 @@
package noppes.npcs;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.network.FMLEventChannel;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import foxz.command.CommandNoppes;
import kamkeel.addon.AddonManager;
import kamkeel.addon.GeckoAddon;
import kamkeel.command.CommandKamkeel;
import kamkeel.developer.Developer;
import net.minecraft.block.Block;
@@ -305,4 +306,4 @@ public class CustomNpcs {
public static MinecraftServer getServer(){
return MinecraftServer.getServer();
}
}
}
+3 -1
View File
@@ -16,7 +16,9 @@ import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.DataSkinOverlays;
import noppes.npcs.util.ValueUtil;
import java.util.*;
import java.util.ArrayList;
import java.util.Random;
import java.util.UUID;
public class DataDisplay {
public EntityNPCInterface npc;
+1 -3
View File
@@ -15,7 +15,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.event.entity.EntityEvent;
@@ -28,7 +27,6 @@ import noppes.npcs.api.gui.ICustomGui;
import noppes.npcs.api.gui.IItemSlot;
import noppes.npcs.api.item.IItemCustom;
import noppes.npcs.api.item.IItemStack;
import noppes.npcs.client.gui.custom.components.CustomGuiSlot;
import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.controllers.CustomGuiController;
import noppes.npcs.controllers.ScriptContainer;
@@ -762,4 +760,4 @@ public class EventHooks {
handler.callScript(EnumScriptType.TIMER, event);
NpcAPI.EVENT_BUS.post(event);
}
}
}
@@ -22,7 +22,6 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.math.BlockPos;
import net.minecraft.village.MerchantRecipeList;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.WorldServer;
+4 -5
View File
@@ -13,7 +13,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import net.minecraft.village.MerchantRecipeList;
import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.util.CustomNPCsThreader;
import java.io.IOException;
import java.util.List;
@@ -58,7 +57,7 @@ public class Server {
e.printStackTrace();
}
}
public static boolean fillBuffer(ByteBuf buffer, Enum enu, Object... obs) throws IOException{
buffer.writeInt(enu.ordinal());
for(Object ob : obs){
@@ -117,13 +116,13 @@ public class Server {
buffer.readBytes(bytes);
return CompressedStreamTools.func_152457_a(bytes, new NBTSizeTracker(2097152L));
}
public static void writeString(ByteBuf buffer, String s){
byte[] bytes = s.getBytes(Charsets.UTF_8);
buffer.writeShort((short)bytes.length);
buffer.writeBytes(bytes);
}
public static String readString(ByteBuf buffer){
try{
byte[] bytes = new byte[buffer.readShort()];
@@ -134,5 +133,5 @@ public class Server {
return null;
}
}
}
@@ -1,9 +1,5 @@
package noppes.npcs.ai;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -11,6 +7,10 @@ import net.minecraft.util.DamageSource;
import noppes.npcs.NoppesUtilServer;
import noppes.npcs.entity.EntityNPCInterface;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
public class CombatHandler {
private Map<EntityLivingBase, Float> aggressors = new HashMap<EntityLivingBase, Float>();
@@ -6,11 +6,11 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.potion.Potion;
import noppes.npcs.compat.PixelmonHelper;
import noppes.npcs.constants.EnumCompanionJobs;
import noppes.npcs.constants.EnumJobType;
import noppes.npcs.constants.EnumMovingType;
import noppes.npcs.constants.EnumRoleType;
import noppes.npcs.compat.PixelmonHelper;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.roles.JobGuard;
import noppes.npcs.roles.RoleCompanion;
@@ -19,7 +19,7 @@ import noppes.npcs.roles.companion.CompanionGuard;
public class NPCAttackSelector implements IEntitySelector
{
private EntityNPCInterface npc;
public NPCAttackSelector(EntityNPCInterface npc){
this.npc = npc;
}
@@ -32,12 +32,12 @@ public class NPCAttackSelector implements IEntitySelector
return false;
if (this.npc.ai.directLOS && !this.npc.getEntitySenses().canSee(entity))
return false;
if(!npc.stats.attackInvisible &&((EntityLivingBase)entity).isPotionActive(Potion.invisibility) && npc.getDistanceSqToEntity(entity) < 9)
return false;
//prevent the npc from going on an endless killing spree
if(!npc.isFollower() && npc.ai.returnToStart){
if(!npc.isFollower() && npc.ai.returnToStart){
int allowedDistance = npc.stats.aggroRange * 2;
if(npc.ai.movingType == EnumMovingType.Wandering)
allowedDistance += npc.ai.walkingRange;
@@ -46,14 +46,14 @@ public class NPCAttackSelector implements IEntitySelector
int[] arr = npc.ai.getCurrentMovingPath();
distance = entity.getDistanceSq(arr[0], arr[1], arr[2]);
}
if(distance > allowedDistance * allowedDistance)
return false;
}
if(npc.advanced.job == EnumJobType.Guard && ((JobGuard)npc.jobInterface).isEntityApplicable(entity))
return true;
if(npc.advanced.role == EnumRoleType.Companion){
RoleCompanion role = (RoleCompanion)npc.roleInterface;
if(role.job == EnumCompanionJobs.GUARD && ((CompanionGuard)role.jobInterface).isEntityApplicable(entity))
@@ -74,7 +74,7 @@ public class NPCAttackSelector implements IEntitySelector
if(npc.advanced.attackOtherFactions)
return npc.faction.isAggressiveToNpc((EntityNPCInterface)entity);
}
return false;
}
}
@@ -2,7 +2,6 @@ package noppes.npcs.ai.target;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.EntityAITarget;
import net.minecraft.entity.player.EntityPlayer;
import noppes.npcs.entity.EntityNPCInterface;
public class EntityAIClearTarget extends EntityAITarget
@@ -1,12 +1,12 @@
package noppes.npcs.client;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.controllers.data.Animation;
import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.client.gui.OverlayQuestTracking;
import noppes.npcs.client.gui.customoverlay.OverlayCustom;
import noppes.npcs.client.renderer.ImageData;
import noppes.npcs.config.ConfigClient;
import noppes.npcs.controllers.data.Animation;
import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.controllers.data.Party;
import noppes.npcs.controllers.data.SkinOverlay;
import noppes.npcs.util.CacheHashMap;
@@ -6,22 +6,21 @@ import cpw.mods.fml.relauncher.Side;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.MouseEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderLivingEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.event.entity.living.LivingEvent;
import noppes.npcs.config.ConfigMixin;
import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.client.gui.customoverlay.OverlayCustom;
import noppes.npcs.client.renderer.RenderCNPCPlayer;
import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.controllers.data.Animation;
import noppes.npcs.controllers.data.Frame;
import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.controllers.data.FramePart;
import noppes.npcs.entity.EntityNPCInterface;
import org.lwjgl.opengl.GL11;
import java.lang.reflect.Field;
import java.util.ArrayList;
@@ -27,7 +27,10 @@ import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.FakePlayer;
import noppes.npcs.*;
import noppes.npcs.CommonProxy;
import noppes.npcs.CustomNpcs;
import noppes.npcs.LogWriter;
import noppes.npcs.PacketHandlerPlayer;
import noppes.npcs.api.IWorld;
import noppes.npcs.blocks.tiles.*;
import noppes.npcs.client.controllers.*;
@@ -43,7 +46,6 @@ import noppes.npcs.client.gui.player.companion.GuiNpcCompanionInv;
import noppes.npcs.client.gui.player.companion.GuiNpcCompanionStats;
import noppes.npcs.client.gui.player.companion.GuiNpcCompanionTalents;
import noppes.npcs.client.gui.questtypes.GuiNpcQuestTypeItem;
import noppes.npcs.client.gui.GuiNpcRemoteEditor;
import noppes.npcs.client.gui.roles.*;
import noppes.npcs.client.gui.script.GuiScriptBlock;
import noppes.npcs.client.gui.script.GuiScriptGlobal;
@@ -597,4 +599,4 @@ public class ClientProxy extends CommonProxy {
return textFont.usedFont().getFontName();
}
}
}
}
@@ -29,18 +29,18 @@ import noppes.npcs.client.gui.customoverlay.OverlayCustom;
import noppes.npcs.client.gui.player.GuiBook;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.config.ConfigClient;
import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.constants.EnumGuiType;
import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.RecipeController;
import noppes.npcs.controllers.data.*;
import noppes.npcs.controllers.data.Animation;
import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.controllers.data.RecipeCarpentry;
import noppes.npcs.entity.EntityDialogNpc;
import noppes.npcs.entity.EntityNPCInterface;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class PacketHandlerClient extends PacketHandlerServer{
@@ -55,7 +55,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
}
}
private void client(ByteBuf buffer, final EntityPlayer player, EnumPacketClient type) throws IOException{
private void client(ByteBuf buffer, final EntityPlayer player, EnumPacketClient type) throws IOException{
if(type == EnumPacketClient.CHATBUBBLE){
Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(buffer.readInt());
if(entity == null || !(entity instanceof EntityNPCInterface))
@@ -65,7 +65,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
npc.messages = new RenderChatMessages();
String text = NoppesStringUtils.formatText(Server.readString(buffer), player, npc);
npc.messages.addMessage(text, npc);
if(buffer.readBoolean())
player.addChatMessage(new ChatComponentTranslation(npc.getCommandSenderName() + ": " + text));
}
@@ -74,7 +74,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
String str;
while((str = Server.readString(buffer)) != null && !str.isEmpty())
message += StatCollector.translateToLocal(str);
player.addChatMessage(new ChatComponentTranslation(message));
}
else if(type == EnumPacketClient.MESSAGE || type == EnumPacketClient.PARTY_MESSAGE){
@@ -93,7 +93,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
RecipeCarpentry recipe = RecipeCarpentry.read(list.getCompoundTagAt(i));
RecipeController.syncRecipes.put(recipe.id,recipe);
}
}
else if(type == EnumPacketClient.SYNCRECIPES_WORKBENCH){
RecipeController.reloadGlobalRecipes(RecipeController.syncRecipes);
@@ -117,7 +117,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
}
else if(type == EnumPacketClient.QUEST_COMPLETION){
NoppesUtil.guiQuestCompletion(player, Server.readNBT(buffer));
}
}
else if(type == EnumPacketClient.EDIT_NPC){
Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(buffer.readInt());
if(entity == null || !(entity instanceof EntityNPCInterface))
@@ -126,10 +126,10 @@ public class PacketHandlerClient extends PacketHandlerServer{
}
else if(type == EnumPacketClient.PLAY_MUSIC){
MusicController.Instance.playMusic(Server.readString(buffer), player);
}
}
else if(type == EnumPacketClient.PLAY_SOUND){
MusicController.Instance.playSound(Server.readString(buffer),buffer.readFloat(),buffer.readFloat(),buffer.readFloat());
}
}
else if(type == EnumPacketClient.UPDATE_NPC){
NBTTagCompound compound = Server.readNBT(buffer);
Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(compound.getInteger("EntityId"));
@@ -141,7 +141,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
NBTTagCompound compound = Server.readNBT(buffer);
Entity entity = Minecraft.getMinecraft().theWorld.getEntityByID(compound.getInteger("EntityId"));
if(entity == null || !(entity instanceof EntityNPCInterface))
return;
return;
((EntityNPCInterface)entity).advanced.setRole(compound.getInteger("Role"));
((EntityNPCInterface)entity).roleInterface.readFromNBT(compound);
NoppesUtil.setLastNpc((EntityNPCInterface) entity);
@@ -213,10 +213,10 @@ public class PacketHandlerClient extends PacketHandlerServer{
GuiScreen gui = Minecraft.getMinecraft().currentScreen;
if(gui == null || !(gui instanceof IGuiError))
return;
int i = buffer.readInt();
NBTTagCompound compound = Server.readNBT(buffer);
((IGuiError)gui).setError(i, compound);
}
else if(type == EnumPacketClient.GUI_CLOSE){
@@ -229,7 +229,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
NBTTagCompound compound = Server.readNBT(buffer);
((IGuiClose)gui).setClose(i, compound);
}
Minecraft mc = Minecraft.getMinecraft();
mc.displayGuiScreen(null);
mc.setIngameFocus();
@@ -240,7 +240,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
}
else if(type == EnumPacketClient.OPEN_BOOK){
int x = buffer.readInt(), y = buffer.readInt(), z = buffer.readInt();
NoppesUtil.openGUI(player, new GuiBook(player, ItemStack.loadItemStackFromNBT(Server.readNBT(buffer)), x, y, z));
}
else if(type == EnumPacketClient.CONFIG){
@@ -258,7 +258,7 @@ public class PacketHandlerClient extends PacketHandlerServer{
if(ConfigClient.config.hasChanged()){
ConfigClient.config.save();
}
player.addChatMessage(new ChatComponentTranslation("Font set to %s", ClientProxy.Font.getName()));
}
else
@@ -4,7 +4,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.CustomNpcs;
import noppes.npcs.controllers.ServerCloneController;
import noppes.npcs.controllers.ServerTagMapController;
import noppes.npcs.controllers.data.TagMap;
import java.io.File;
@@ -6,16 +6,15 @@ import net.minecraft.client.audio.SoundHandler;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class ScriptSoundController {
public HashMap<Integer, ScriptClientSound> sounds = new HashMap<>();
public static ScriptSoundController Instance;
public ScriptSoundController() {
public ScriptSoundController() {
Instance = this;
}
public void onUpdate() {
SoundHandler soundHandler = Minecraft.getMinecraft().getSoundHandler();
final Iterator<Map.Entry<Integer, ScriptClientSound>> iterator = sounds.entrySet().iterator();
@@ -6,8 +6,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.IResource;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
@@ -15,17 +13,10 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.client.ClientProxy;
import noppes.npcs.client.ImageDownloadAlt;
import noppes.npcs.client.renderer.ImageBufferDownloadAlt;
import noppes.npcs.client.renderer.ImageData;
import noppes.npcs.scripted.ScriptParticle;
import org.lwjgl.opengl.GL11;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
public class CustomFX extends EntityFX {
private final Entity entity;
private final String directory;
@@ -377,7 +368,7 @@ public class CustomFX extends EntityFX {
return (int)(((int)rr << 16) + ((int)rg << 8) + (rb));
}
public int getFXLayer(){
return 0;
}
@@ -3,9 +3,9 @@ package noppes.npcs.client.fx;
import net.minecraft.client.particle.EntityPortalFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.ClientProxy;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
import org.lwjgl.opengl.GL11;
public class EntityEnderFX extends EntityPortalFX{
@@ -17,11 +17,11 @@ public class EntityEnderFX extends EntityPortalFX{
private final ResourceLocation location;
private boolean move = true;
private float startX = 0, startY = 0, startZ = 0;
public EntityEnderFX(EntityCustomNpc npc, double par2, double par4,
double par6, double par8, double par10, double par12, ModelPartData data) {
super(npc.worldObj, par2, par4, par6, par8, par10, par12);
this.npc = npc;
particleNumber = npc.getRNG().nextInt(2);
portalParticleScale = particleScale = rand.nextFloat() * 0.2F + 0.5F;
@@ -29,14 +29,14 @@ public class EntityEnderFX extends EntityPortalFX{
particleRed = (data.color >> 16 & 255) / 255f;
particleGreen = (data.color >> 8 & 255) / 255f;
particleBlue = (data.color & 255) / 255f;
if(npc.getRNG().nextInt(3) == 1){
move = false;
this.startX = (float) npc.posX;
this.startY = (float) npc.posY;
this.startZ = (float) npc.posZ;
}
if(data.playerTexture)
location = npc.textureLocation;
else
@@ -45,7 +45,7 @@ public class EntityEnderFX extends EntityPortalFX{
@Override
public void renderParticle(Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
{
{
if(move){
startX = (float)(npc.prevPosX + (npc.posX - npc.prevPosX) * (double)par2);
startY = (float)(npc.prevPosY + (npc.posY - npc.prevPosY) * (double)par2);
@@ -58,9 +58,9 @@ public class EntityEnderFX extends EntityPortalFX{
scale *= scale;
scale = 1.0F - scale;
particleScale = portalParticleScale * scale;
ClientProxy.bindTexture(location);
float f = 0.875f;
float f1 = f + 0.125f;
float f2 = 0.75f - (particleNumber * 0.25f);
@@ -79,12 +79,12 @@ public class EntityEnderFX extends EntityPortalFX{
par1Tessellator.addVertexWithUV((f5 - par3 * f4) + par6 * f4, f6 + par4 * f4, (f7 - par5 * f4) + par7 * f4, f1, f2);
par1Tessellator.addVertexWithUV(f5 + par3 * f4 + par6 * f4, f6 + par4 * f4, f7 + par5 * f4 + par7 * f4, f, f2);
par1Tessellator.addVertexWithUV((f5 + par3 * f4) - par6 * f4, f6 - par4 * f4, (f7 + par5 * f4) - par7 * f4, f, f3);
tessellator.draw();
ClientProxy.bindTexture(resource);
tessellator.startDrawingQuads();
}
public int getFXLayer(){
return 0;
}
@@ -14,13 +14,15 @@ import noppes.npcs.client.controllers.ClientCloneController;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.data.Tag;
import noppes.npcs.controllers.data.TagMap;
import noppes.npcs.entity.EntityNPCInterface;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.UUID;
public class GuiNpcMobSpawnerAdd extends GuiNPCInterface implements GuiYesNoCallback, IGuiData, ISubGuiListener {
private Entity toClone;
private NBTTagCompound compound;
private static boolean serverSide = false;
@@ -58,7 +60,7 @@ public class GuiNpcMobSpawnerAdd extends GuiNPCInterface implements GuiYesNoCall
String name = toClone.getCommandSenderName();
addLabel(new GuiNpcLabel(0, "Save as", guiLeft + 4, guiTop + 6));
addTextField(new GuiNpcTextField(0, this, fontRendererObj, guiLeft + 4, guiTop + 18, 200, 20, name));
addLabel(new GuiNpcLabel(1, "Tab", guiLeft + 10, guiTop + 50));
addButton(new GuiButtonBiDirectional(2, guiLeft + 40, guiTop + 45, 60, 20, new String[]{"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"}, tab - 1));
@@ -140,7 +142,7 @@ public class GuiNpcMobSpawnerAdd extends GuiNPCInterface implements GuiYesNoCall
@Override
public void save() {
}
@Override
@@ -11,8 +11,6 @@ import net.minecraft.util.StatCollector;
import noppes.npcs.client.NoppesUtil;
import noppes.npcs.client.controllers.MusicController;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.entity.EntityNPCInterface;
import org.lwjgl.Sys;
import java.util.*;
@@ -22,16 +20,16 @@ public class GuiNpcSoundSelection extends GuiNPCInterface {
public String domain;
private final GuiScreen parent;
public GuiSelectionListener listener;
private String up = "..<" + StatCollector.translateToLocal("gui.up") + ">..";
private HashMap<String,List<String>> domains = new HashMap<String,List<String>>();
public GuiNpcSoundSelection(GuiScreen parent, String sound)
{
SoundHandler handler = Minecraft.getMinecraft().getSoundHandler();
SoundRegistry registry = ObfuscationReflectionHelper.getPrivateValue(SoundHandler.class, handler, 4);
Set<ResourceLocation> set = registry.getKeys();
for(ResourceLocation location : set){
List<String> list = domains.get(location.getResourceDomain());
@@ -53,9 +51,9 @@ public class GuiNpcSoundSelection extends GuiNPCInterface {
if(domain == null)
ss = "Select domain";
addLabel(new GuiNpcLabel(0,ss, width / 2 - (this.fontRendererObj.getStringWidth(ss)/2), 20, 0xffffff));
Collection<String> col = domains.keySet();
if(domain != null){
col = domains.get(domain);
if(!col.contains(up))
@@ -69,12 +67,12 @@ public class GuiNpcSoundSelection extends GuiNPCInterface {
}
else
this.addButton(new GuiNpcButton(4, width / 2 - 100, height - 50,98, 20, "gui.open"));
this.addButton(new GuiNpcButton(2, width / 2 + 2, height - 50,98, 20, "gui.cancel"));
}
public void drawScreen(int i, int j, float f)
{
{
slot.drawScreen(i, j, f);
super.drawScreen(i, j, f);
}
@@ -123,7 +121,7 @@ public class GuiNpcSoundSelection extends GuiNPCInterface {
}
}
public void save() {
}
public void close() {
this.save();
@@ -3,7 +3,6 @@ package noppes.npcs.client.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.util.StatCollector;
import noppes.npcs.client.gui.util.*;
import org.lwjgl.Sys;
import java.util.*;
@@ -119,4 +118,4 @@ public class SubGuiClonerQuickTags extends SubGuiInterface implements IScrollDat
public void setSelected(String selected) {
}
}
}
@@ -1,11 +1,9 @@
package noppes.npcs.client.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.client.Client;
import noppes.npcs.client.NoppesUtil;
import noppes.npcs.client.gui.global.GuiNPCManageDialogs;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.config.ConfigMain;
import noppes.npcs.constants.EnumPacketServer;
@@ -1,18 +1,11 @@
package noppes.npcs.client.gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.util.StatCollector;
import noppes.npcs.client.Client;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.constants.EnumPartyExchange;
import noppes.npcs.constants.EnumPartyRequirements;
import noppes.npcs.controllers.data.FactionOptions;
import noppes.npcs.controllers.data.PartyOptions;
import java.util.HashMap;
import java.util.Vector;
public class SubGuiNpcPartyOptions extends SubGuiInterface implements ITextfieldListener
{
private final PartyOptions options;
@@ -4,7 +4,8 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.client.Client;
import noppes.npcs.client.NoppesUtil;
import noppes.npcs.client.gui.global.*;
import noppes.npcs.client.gui.global.GuiNPCManageQuest;
import noppes.npcs.client.gui.global.GuiNPCQuestSelection;
import noppes.npcs.client.gui.questtypes.GuiNpcQuestTypeDialog;
import noppes.npcs.client.gui.questtypes.GuiNpcQuestTypeKill;
import noppes.npcs.client.gui.questtypes.GuiNpcQuestTypeLocation;
@@ -8,7 +8,6 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import noppes.npcs.client.NoppesUtil;
import noppes.npcs.client.controllers.MusicController;
import noppes.npcs.client.gui.util.*;
@@ -29,7 +28,7 @@ public class SubGuiNpcSoundSelection extends SubGuiInterface {
{
SoundHandler handler = Minecraft.getMinecraft().getSoundHandler();
SoundRegistry registry = ObfuscationReflectionHelper.getPrivateValue(SoundHandler.class, handler, 4);
Set<ResourceLocation> set = registry.getKeys();
for(ResourceLocation location : set){
List<String> list = domains.get(location.getResourceDomain());
@@ -51,9 +50,9 @@ public class SubGuiNpcSoundSelection extends SubGuiInterface {
if(domain == null)
ss = "Select domain";
addLabel(new GuiNpcLabel(0,ss, width / 2 - (this.fontRendererObj.getStringWidth(ss)/2), 20, 0xffffff));
Collection<String> col = domains.keySet();
if(domain != null){
col = domains.get(domain);
if(!col.contains(up))
@@ -67,12 +66,12 @@ public class SubGuiNpcSoundSelection extends SubGuiInterface {
}
else
this.addButton(new GuiNpcButton(4, width / 2 - 100, height - 50,98, 20, "gui.open"));
this.addButton(new GuiNpcButton(2, width / 2 + 2, height - 50,98, 20, "gui.cancel"));
}
public void drawScreen(int i, int j, float f)
{
{
slot.drawScreen(i, j, f);
super.drawScreen(i, j, f);
}
@@ -119,7 +118,7 @@ public class SubGuiNpcSoundSelection extends SubGuiInterface {
}
}
public void save() {
}
public void close() {
@@ -1,19 +1,19 @@
package noppes.npcs.client.gui.advanced;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
import net.minecraft.util.StatCollector;
import noppes.npcs.client.Client;
import noppes.npcs.client.gui.SubGuiNpcFactionOptions;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.RecipeController;
import noppes.npcs.entity.EntityNPCInterface;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Vector;
public class GuiNPCTagSetup extends GuiNPCInterface2 implements IScrollData,ICustomScrollListener,IGuiData
{
@@ -78,9 +78,9 @@ public class GuiNPCTagSetup extends GuiNPCInterface2 implements IScrollData,ICus
}
initGui();
}
@Override
public void setData(Vector<String> list, HashMap<String, Integer> data)
public void setData(Vector<String> list, HashMap<String, Integer> data)
{
allTags.addAll(data.keySet());
allTags.sort(String.CASE_INSENSITIVE_ORDER);
@@ -96,23 +96,23 @@ public class GuiNPCTagSetup extends GuiNPCInterface2 implements IScrollData,ICus
tagNames.add(tagList.getStringTagAt(i));
}
}
public void mouseClicked(int i, int j, int k)
{
super.mouseClicked(i, j, k);
if(k == 0 && scrollTags != null)
scrollTags.mouseClicked(i, j, k);
}
@Override
public void setSelected(String selected) {
scrollTags.setSelected(selected);
}
@Override
public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) {
}
public void save() {
NBTTagCompound tagCompound = new NBTTagCompound();
NBTTagList tagList = new NBTTagList();
@@ -2,15 +2,15 @@ package noppes.npcs.client.gui.global;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.client.Client;
import noppes.npcs.client.gui.SubGuiAnimationFrame;
import noppes.npcs.client.gui.SubGuiAnimationOptions;
import noppes.npcs.client.gui.SubGuiColorSelector;
import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.client.Client;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.data.Animation;
import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.controllers.data.Frame;
import noppes.npcs.controllers.data.FramePart;
import noppes.npcs.entity.EntityCustomNpc;
@@ -11,7 +11,6 @@ import noppes.npcs.controllers.data.AnimationData;
import noppes.npcs.controllers.data.Frame;
import noppes.npcs.controllers.data.FramePart;
import noppes.npcs.entity.EntityNPCInterface;
import org.lwjgl.opengl.GL11;
import java.util.ArrayList;
import java.util.HashMap;
@@ -43,10 +42,10 @@ public class GuiNPCManageAnimations extends GuiModelInterface2 implements IScrol
public void initGui()
{
super.initGui();
this.addButton(new GuiNpcButton(0,guiLeft + 368, guiTop + 8, 45, 20, "gui.add"));
this.addButton(new GuiNpcButton(1,guiLeft + 368, guiTop + 32, 45, 20, "gui.remove"));
if(scrollAnimations == null){
scrollAnimations = new GuiCustomScroll(this,0, 0);
scrollAnimations.setSize(143, 185);
@@ -219,17 +218,17 @@ public class GuiNPCManageAnimations extends GuiModelInterface2 implements IScrol
String name = scrollAnimations.getSelected();
this.data = data;
scrollAnimations.setList(getSearchList());
if(name != null)
scrollAnimations.setSelected(name);
}
@Override
public void setSelected(String selected) {
this.selected = selected;
scrollAnimations.setSelected(selected);
}
@Override
public void customScrollClicked(int i, int j, int k, GuiCustomScroll guiCustomScroll) {
if(guiCustomScroll.id == 0)
@@ -238,18 +237,18 @@ public class GuiNPCManageAnimations extends GuiModelInterface2 implements IScrol
Client.sendData(EnumPacketServer.AnimationGet, data.get(selected));
}
}
public void save() {
if(selected != null && data.containsKey(selected) && animation != null){
Client.sendData(EnumPacketServer.AnimationSave, animation.writeToNBT());
}
}
@Override
public void unFocused(GuiNpcTextField guiNpcTextField) {
if(animation.id == -1)
return;
if(guiNpcTextField.id == 0) {
String name = guiNpcTextField.getText();
if(!name.isEmpty() && !data.containsKey(name)){
@@ -3,7 +3,8 @@ package noppes.npcs.client.gui.global;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.client.Client;
import noppes.npcs.client.gui.*;
import noppes.npcs.client.gui.SubGuiEditText;
import noppes.npcs.client.gui.SubGuiNpcDialog;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.data.Dialog;
@@ -32,7 +33,7 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
private String catSearch = "";
private String diagSearch = "";
public GuiNPCManageDialogs(EntityNPCInterface npc)
{
super(npc);
@@ -150,7 +151,7 @@ public class GuiNPCManageDialogs extends GuiNPCInterface2 implements IScrollGrou
}
return list;
}
public void buttonEvent(GuiButton guibutton)
{
int id = guibutton.id;
@@ -4,9 +4,10 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.client.Client;
import noppes.npcs.client.gui.*;
import noppes.npcs.client.gui.SubGuiEditText;
import noppes.npcs.client.gui.SubGuiNpcQuest;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.data.Quest;
import noppes.npcs.controllers.data.QuestCategory;
import noppes.npcs.entity.EntityNPCInterface;
@@ -3,10 +3,7 @@ package noppes.npcs.client.gui.global;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiYesNo;
import net.minecraft.client.gui.GuiYesNoCallback;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.client.Client;
import noppes.npcs.client.NoppesUtil;
import noppes.npcs.client.controllers.ClientCloneController;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.constants.EnumPlayerData;
@@ -25,7 +22,7 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
private HashMap<String,Integer> data = new HashMap<String,Integer>();
private EnumPlayerData selection = EnumPlayerData.Players;
private String search = "";
public GuiNpcManagePlayerData(EntityNPCInterface npc)
{
super(npc);
@@ -34,13 +31,13 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
public void initGui()
{
super.initGui();
super.initGui();
scroll = new GuiCustomScroll(this,0, 0);
scroll.setSize(303, 175);
scroll.guiLeft = guiLeft + 4;
scroll.guiTop = guiTop + 16;
addScroll(scroll);
addLabel(new GuiNpcLabel(0,"All Players", guiLeft + 10, guiTop + 6));
this.addButton(new GuiNpcButton(0, guiLeft + 313, guiTop + 10,98, 20, "selectWorld.deleteButton"));
@@ -55,7 +52,7 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
addTextField(new GuiNpcTextField(0, this, fontRendererObj, guiLeft + 4, guiTop + 193, 303, 20, search));
getTextField(0).enabled = selection == EnumPlayerData.Players;
initButtons();
}
@@ -66,7 +63,7 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
getButton(4).setEnabled(selection != EnumPlayerData.Transport);
getButton(5).setEnabled(selection != EnumPlayerData.Bank);
getButton(6).setEnabled(selection != EnumPlayerData.Factions);
if(selection == EnumPlayerData.Players)
getLabel(0).label = "All Players";
else
@@ -84,7 +81,7 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
if(k == 0 && scroll != null)
scroll.mouseClicked(i, j, k);
}
public void keyTyped(char c, int i)
{
super.keyTyped(c, i);
@@ -104,7 +101,7 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
}
return list;
}
protected void actionPerformed(GuiButton guibutton)
{
int id = guibutton.id;
@@ -141,7 +138,7 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
displayGuiScreen(new GuiYesNo(this, "Warning", "Do not operate on PlayerData as its regenerating", 1));
}
}
@Override
public void save() {
}
@@ -149,9 +146,9 @@ public class GuiNpcManagePlayerData extends GuiNPCInterface2 implements IScrollD
@Override
public void setData(Vector<String> list, HashMap<String, Integer> data) {
this.data.putAll(data);
scroll.setList(getSearchList());
if(selection == EnumPlayerData.Players && selectedPlayer != null){
scroll.setSelected(selectedPlayer);
selected = selectedPlayer;
@@ -10,7 +10,6 @@ import noppes.npcs.client.gui.SubGuiNpcDimensions;
import noppes.npcs.client.gui.SubGuiSpawningOptions;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.data.DialogImage;
import noppes.npcs.controllers.data.SpawnData;
import noppes.npcs.entity.EntityNPCInterface;
@@ -23,12 +22,12 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
private String search = "";
private SpawnData spawn = new SpawnData();
public GuiNpcNaturalSpawns(EntityNPCInterface npc) {
super(npc);
Client.sendData(EnumPacketServer.NaturalSpawnGetAll);
}
@Override
public void initGui(){
super.initGui();
@@ -43,11 +42,11 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
this.addButton(new GuiNpcButton(1,guiLeft + 358, guiTop + 38, 58, 20, "gui.add"));
this.addButton(new GuiNpcButton(2,guiLeft + 358, guiTop + 61, 58, 20, "gui.remove"));
if(this.spawn.id >= 0)
showSpawn();
}
private void showSpawn() {
addLabel(new GuiNpcLabel(1,"gui.title", guiLeft + 4, guiTop + 8));
addTextField(new GuiNpcTextField(1, this, this.fontRendererObj, guiLeft + 60, guiTop + 3, 140, 20, this.spawn.name));
@@ -126,7 +125,7 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
String name = "New";
while(data.containsKey(name))
name += "_";
SpawnData spawn = new SpawnData();
spawn.name = name;
Client.sendData(EnumPacketServer.NaturalSpawnSave, spawn.writeNBT(new NBTTagCompound()));
@@ -206,13 +205,13 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
initGui();
}
}
@Override
public void setData(Vector<String> list, HashMap<String, Integer> data) {
String name = scrollNaturalSpawns.getSelected();
this.data = data;
scrollNaturalSpawns.setList(getSearchList());
if(name != null)
scrollNaturalSpawns.setSelected(name);
initGui();
@@ -251,7 +250,7 @@ public class GuiNpcNaturalSpawns extends GuiNPCInterface2 implements IGuiData, I
initGui();
}
}
@Override
public void setGuiData(NBTTagCompound compound) {
spawn.readNBT(compound);
@@ -1,6 +1,5 @@
package noppes.npcs.client.gui.model;
import kamkeel.addon.GeckoAddon;
import kamkeel.addon.client.GeckoAddonClient;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
@@ -17,8 +16,8 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.client.Client;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.compat.PixelmonHelper;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.entity.*;
import java.lang.reflect.Method;
@@ -8,12 +8,12 @@ import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.client.EntityUtil;
import noppes.npcs.client.gui.util.GuiNPCInterface;
import noppes.npcs.client.gui.util.GuiNPCStringSlot;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.entity.*;
import noppes.npcs.entity.data.ModelData;
import org.lwjgl.opengl.GL11;
import java.util.Collections;
@@ -26,7 +26,7 @@ public class GuiEntitySelection extends GuiNPCInterface
private Class<? extends EntityLivingBase> prevModel;
private ModelData playerdata;
private EntityCustomNpc npc;
public GuiEntitySelection(GuiCreationScreen parent, ModelData playerdata, EntityCustomNpc npc)
{
this.parent = parent;
@@ -35,7 +35,7 @@ public class GuiEntitySelection extends GuiNPCInterface
drawDefaultBackground = false;
prevModel = playerdata.getEntityClass();
}
@Override
public void initGui()
{
@@ -51,7 +51,7 @@ public class GuiEntitySelection extends GuiNPCInterface
slot.selected = "CustomNPC";
}
slot.registerScrollButtons(4, 5);
this.buttonList.add(new GuiNpcButton(2, width / 2 - 100, height - 44,98, 20, "gui.back"));
}
@@ -63,18 +63,18 @@ public class GuiEntitySelection extends GuiNPCInterface
entity = this.npc;
else
EntityUtil.Copy(npc, entity);
int l = (width/2)-180;
int i1 = (height/2) - 90;
GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/);
GL11.glEnable(2903 /*GL_COLOR_MATERIAL*/);
GL11.glPushMatrix();
GL11.glTranslatef(l + 33, i1 + 131, 50F);
float scale = 1;
if(entity.height > 2.4)
scale = 2 / entity.height;
GL11.glScalef(-50 * scale, 50 * scale, 50 * scale);
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
float f2 = entity.renderYawOffset;
@@ -160,11 +160,11 @@ public class GuiEntitySelection extends GuiNPCInterface
close();
}
}
public void close() {
public void close() {
this.mc.displayGuiScreen(parent);
}
protected void actionPerformed(GuiButton guibutton)
{
close();
@@ -173,7 +173,7 @@ public class GuiEntitySelection extends GuiNPCInterface
@Override
public void save() {
// TODO Auto-generated method stub
}
@@ -2,11 +2,11 @@ package noppes.npcs.client.gui.model;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.gui.util.GuiModelInterface;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
public class GuiModelArms extends GuiModelInterface{
@@ -73,7 +73,7 @@ public class GuiModelArms extends GuiModelInterface{
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("claws"), npc));
}
}
@Override
public void close(){
this.mc.displayGuiScreen(parent);
@@ -2,11 +2,11 @@ package noppes.npcs.client.gui.model;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.gui.util.GuiModelInterface;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
public class GuiModelBody extends GuiModelInterface{
@@ -19,7 +19,7 @@ public class GuiModelBody extends GuiModelInterface{
private final String[] arrParticles = new String[]{"gui.no","Player","Type1", "Type2", "Rainbow", "Type3", "Type4", "Type5", "Type6", "Type7"};
private final String[] arrfins = new String[]{"gui.no","Player","Type1","Type2","Type3","Type4","Type5","Type6"};
private final String[] arrskirt = new String[]{"gui.no","Player","Type1"};
public GuiModelBody(GuiScreen parent, EntityCustomNpc npc){
super(npc);
this.parent = parent;
@@ -137,7 +137,7 @@ public class GuiModelBody extends GuiModelInterface{
if(particles.type == 1){
return 4;
}
return 0;
}
@@ -246,7 +246,7 @@ public class GuiModelBody extends GuiModelInterface{
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("skirt"), npc));
}
}
@Override
public void close(){
this.mc.displayGuiScreen(parent);
@@ -4,11 +4,11 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.resources.IResource;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.gui.util.GuiModelInterface;
import noppes.npcs.client.gui.util.GuiNpcTextField;
import noppes.npcs.client.gui.util.ITextfieldListener;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
import org.lwjgl.opengl.GL11;
import javax.imageio.ImageIO;
@@ -20,9 +20,9 @@ public class GuiModelColor extends GuiModelInterface implements ITextfieldListen
private GuiScreen parent;
private final static ResourceLocation color = new ResourceLocation("customnpcs:textures/gui/color.png");
private int colorX, colorY;
private GuiNpcTextField textfield;
private ModelPartData data;
@@ -42,7 +42,7 @@ public class GuiModelColor extends GuiModelInterface implements ITextfieldListen
this.addTextField(textfield = new GuiNpcTextField(0, this, guiLeft + 25, guiTop + 20, 70, 20, data.getColor()));
textfield.setTextColor(data.color);
}
@Override
public void keyTyped(char c, int i){
String prev = textfield.getText();
@@ -74,11 +74,11 @@ public class GuiModelColor extends GuiModelInterface implements ITextfieldListen
public void drawScreen(int par1, int par2, float par3){
super.drawScreen(par1, par2, par3);
mc.getTextureManager().bindTexture(color);
GL11.glColor4f(1, 1, 1, 1);
this.drawTexturedModalRect(colorX, colorY, 0, 0, 120, 120);
}
@Override
public void mouseClicked(int i, int j, int k)
{
@@ -95,15 +95,15 @@ public class GuiModelColor extends GuiModelInterface implements ITextfieldListen
textfield.setTextColor(color);
textfield.setText(data.getColor());
}
} catch (IOException e) {
}
}
finally{
if(stream != null){
try {
stream.close();
} catch (IOException e) {
}
}
}
@@ -2,11 +2,11 @@ package noppes.npcs.client.gui.model;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.gui.util.GuiModelInterface;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
public class GuiModelHead extends GuiModelInterface{
@@ -90,7 +90,7 @@ public class GuiModelHead extends GuiModelInterface{
return 4;
if(data.type == 1)
return 3;
return 0;
}
@@ -107,7 +107,7 @@ public class GuiModelHead extends GuiModelInterface{
protected void actionPerformed(GuiButton btn) {
super.actionPerformed(btn);
GuiNpcButton button = (GuiNpcButton) btn;
if(button.id == 0){
playerdata.headwear = (byte) button.getValue();
}
@@ -2,11 +2,11 @@ package noppes.npcs.client.gui.model;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.gui.util.GuiModelInterface;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
public class GuiModelLegs extends GuiModelInterface{
@@ -83,7 +83,7 @@ public class GuiModelLegs extends GuiModelInterface{
return 9;
if(data.type == 6)
return 10;
return 0;
}
@@ -169,7 +169,7 @@ public class GuiModelLegs extends GuiModelInterface{
this.mc.displayGuiScreen(new GuiModelColor(this, playerdata.getPartData("tail"), npc));
}
}
@Override
public void close(){
this.mc.displayGuiScreen(parent);
@@ -2,14 +2,10 @@ package noppes.npcs.client.gui.model;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelRotatePart;
import noppes.npcs.client.gui.util.GuiModelInterface;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcLabel;
import noppes.npcs.client.gui.util.GuiNpcSlider;
import noppes.npcs.client.gui.util.ISliderListener;
import noppes.npcs.entity.EntityCustomNpc;
public class GuiModelRotate extends GuiModelInterface implements ISliderListener{
@@ -20,7 +16,7 @@ public class GuiModelRotate extends GuiModelInterface implements ISliderListener
private GuiNpcSlider rotateX;
private GuiNpcSlider rotateY;
private GuiNpcSlider rotateZ;
public GuiModelRotate(GuiScreen parent, ModelData data, EntityCustomNpc npc){
super(npc);
this.parent = parent;
@@ -113,7 +109,7 @@ public class GuiModelRotate extends GuiModelInterface implements ISliderListener
}
}
}
private void drawSlider(int y, ModelRotatePart config){
part = config;
addButton(new GuiNpcButton(29, guiLeft + 100, y , 80, 20, new String[]{"gui.enabled","gui.disabled"}, config.disabled ?1:0));
@@ -144,7 +140,7 @@ public class GuiModelRotate extends GuiModelInterface implements ISliderListener
}
if(!(btn instanceof GuiNpcButton))
return;
GuiNpcButton button = (GuiNpcButton) btn;
if(btn.id == 14){
playerdata.enableRotation = button.getValue() == 0;
@@ -194,7 +190,7 @@ public class GuiModelRotate extends GuiModelInterface implements ISliderListener
public void mouseDragged(GuiNpcSlider slider) {
int percent = (int) ((slider.sliderValue) * 360);
slider.setString(percent + "%");
if(slider.id == 10)
part.rotationX = slider.sliderValue - 0.5f;
if(slider.id == 11)
@@ -206,10 +202,10 @@ public class GuiModelRotate extends GuiModelInterface implements ISliderListener
@Override
public void mousePressed(GuiNpcSlider slider) {
}
@Override
public void mouseReleased(GuiNpcSlider slider) {
}
}
}
@@ -2,10 +2,10 @@ package noppes.npcs.client.gui.model;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelScalePart;
import noppes.npcs.client.gui.util.*;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelScalePart;
public class GuiModelScale extends GuiModelInterface implements ISliderListener{
@@ -39,7 +39,7 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
addButton(new GuiNpcButton(0, guiLeft + 110, y , 60, 20, "Edit"));
y += 24;
}
addLabel(new GuiNpcLabel(21, "Body", guiLeft + 55, y + 5, 0xFFFFFF));
if(type == 1){
drawSlider(y, playerdata.modelScale.body);
@@ -49,7 +49,7 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
addButton(new GuiNpcButton(1, guiLeft + 110, y , 60, 20, "Edit"));
y += 24;
}
addLabel(new GuiNpcLabel(22, "Arms", guiLeft + 55, y + 5, 0xFFFFFF));
if(type == 2){
drawSlider(y, playerdata.modelScale.arms);
@@ -59,7 +59,7 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
addButton(new GuiNpcButton(2, guiLeft + 110, y , 60, 20, "Edit"));
y += 24;
}
addLabel(new GuiNpcLabel(23, "Legs", guiLeft + 55, y + 5, 0xFFFFFF));
if(type == 3){
drawSlider(y, playerdata.modelScale.legs);
@@ -70,7 +70,7 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
y += 24;
}
}
private void drawSlider(int y, ModelScalePart config){
y += 20;
addLabel(new GuiNpcLabel(10, "Width", guiLeft - 25 + offset, y + 5, 0xFFFFFF));
@@ -150,7 +150,7 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
config = playerdata.modelScale.arms;
else if(type == 3)
config = playerdata.modelScale.legs;
if(slider.id == 10)
config.scaleX = slider.sliderValue + 0.5f;
if(slider.id == 11)
@@ -163,7 +163,7 @@ public class GuiModelScale extends GuiModelInterface implements ISliderListener{
@Override
public void mousePressed(GuiNpcSlider slider) {
// TODO Auto-generated method stub
}
@Override
@@ -2,17 +2,17 @@ package noppes.npcs.client.gui.model;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.client.controllers.Preset;
import noppes.npcs.client.controllers.PresetController;
import noppes.npcs.client.gui.util.GuiNPCInterface;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.client.gui.util.GuiNpcTextField;
import noppes.npcs.entity.data.ModelData;
public class GuiPresetSave extends GuiNPCInterface{
private ModelData data;
private GuiScreen parent;
public GuiPresetSave(GuiScreen parent, ModelData data){
this.data = data;
this.parent = parent;
@@ -44,6 +44,6 @@ public class GuiPresetSave extends GuiNPCInterface{
@Override
public void save() {
// TODO Auto-generated method stub
}
}
@@ -8,7 +8,6 @@ import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.client.EntityUtil;
import noppes.npcs.client.controllers.Preset;
import noppes.npcs.client.controllers.PresetController;
@@ -16,6 +15,7 @@ import noppes.npcs.client.gui.util.GuiNPCInterface;
import noppes.npcs.client.gui.util.GuiNPCStringSlot;
import noppes.npcs.client.gui.util.GuiNpcButton;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelData;
import org.lwjgl.opengl.GL11;
import java.util.Collections;
@@ -28,7 +28,7 @@ public class GuiPresetSelection extends GuiNPCInterface
private NBTTagCompound prevData;
private ModelData playerdata;
private EntityCustomNpc npc;
public GuiPresetSelection(GuiCreationScreen parent, ModelData playerdata)
{
this.parent = parent;
@@ -37,17 +37,17 @@ public class GuiPresetSelection extends GuiNPCInterface
drawDefaultBackground = false;
npc = new EntityCustomNpc(Minecraft.getMinecraft().theWorld);
npc.modelData = playerdata.copy();
PresetController.instance.load();
}
public void initGui()
{
super.initGui();
Vector<String> list = new Vector<String>();
for(Preset preset : PresetController.instance.presets.values())
list.add(preset.name);
Collections.sort(list,String.CASE_INSENSITIVE_ORDER);
slot = new GuiNPCStringSlot(list,this,false,18);
slot.registerScrollButtons(4, 5);
@@ -65,7 +65,7 @@ public class GuiPresetSelection extends GuiNPCInterface
entity = this.npc;
else
EntityUtil.Copy(npc, entity);
int l = (width/2)-180;
int i1 = (height/2) - 90;
GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/);
@@ -122,14 +122,14 @@ public class GuiPresetSelection extends GuiNPCInterface
close();
}
}
public void close() {
public void close() {
mc.displayGuiScreen(parent);
}
public FontRenderer getFontRenderer() {
return this.fontRendererObj;
}
@Override
protected void actionPerformed(GuiButton button)
{
@@ -146,7 +146,7 @@ public class GuiPresetSelection extends GuiNPCInterface
Vector<String> list = new Vector<String>();
for(Preset preset : PresetController.instance.presets.values())
list.add(preset.name);
Collections.sort(list,String.CASE_INSENSITIVE_ORDER);
slot.setList(list);
slot.selected = "";
@@ -156,7 +156,7 @@ public class GuiPresetSelection extends GuiNPCInterface
@Override
public void save() {
// TODO Auto-generated method stub
}
@@ -11,7 +11,6 @@ import noppes.npcs.NBTTags;
import noppes.npcs.client.Client;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.ScriptContainer;
import noppes.npcs.controllers.ScriptController;
import noppes.npcs.controllers.data.PlayerDataScript;
import java.util.List;
@@ -1,19 +1,14 @@
package noppes.npcs.client.gui.util;
import kamkeel.util.TextSplitter;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import java.util.*;
import static noppes.npcs.client.gui.util.GuiHoverText.buttonTextures;
public class GuiCustomScroll extends GuiScreen
{
public static final ResourceLocation resource = new ResourceLocation("customnpcs","textures/gui/misc.png");
@@ -40,7 +35,7 @@ public class GuiCustomScroll extends GuiScreen
private boolean isSorted = true;
public boolean visible = true;
private boolean selectable = true;
public GuiCustomScroll(GuiScreen parent, int id)
{
width = 176;
@@ -75,12 +70,12 @@ public class GuiCustomScroll extends GuiScreen
ySize = y;
xSize = x;
listHeight = 14 * list.size();
if(listHeight > 0)
scrollHeight = (int) (((double)(ySize - 8) / (double)listHeight) * (ySize-8));
else
scrollHeight = Integer.MAX_VALUE;
maxScrollY = listHeight - (ySize - 8) - 1;
}
@@ -100,7 +95,7 @@ public class GuiCustomScroll extends GuiScreen
GL11.glPushMatrix();
GL11.glTranslatef(guiLeft, guiTop, 0.0F);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
if(selectable)
hover = getMouseOver(i,j);
@@ -131,10 +126,10 @@ public class GuiCustomScroll extends GuiScreen
if(i >= xSize-9 && i < xSize-4 && j >= 4 && j < ySize){
isScrolling = true;
}
}
}
else
isScrolling = false;
if(isScrolling){
scrollY = (((j - 8) * listHeight) / (ySize-8)) - (scrollHeight);
if(scrollY < 0){
@@ -144,14 +139,14 @@ public class GuiCustomScroll extends GuiScreen
scrollY = maxScrollY;
}
}
if(mouseScrolled != 0){
scrollY += mouseScrolled > 0?-14:14;
if(scrollY > maxScrollY)
scrollY = maxScrollY;
if(scrollY < 0)
scrollY = 0;
}
}
}
}
@@ -252,12 +247,12 @@ public class GuiCustomScroll extends GuiScreen
{
continue;
}
return j1;
}
}
return -1;
}
@@ -331,7 +326,7 @@ public class GuiCustomScroll extends GuiScreen
Collections.sort(list,String.CASE_INSENSITIVE_ORDER);
if(old.equals(select))
select = name;
selected = list.indexOf(select);
setSize(xSize,ySize);
}
@@ -4,7 +4,6 @@ import net.minecraft.util.StatCollector;
import noppes.npcs.client.gui.GuiNpcMobSpawner;
import noppes.npcs.controllers.data.Tag;
import java.util.HashSet;
import java.util.UUID;
public class GuiCustomScrollCloner extends GuiCustomScroll {
@@ -6,27 +6,27 @@ import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.EntityLivingBase;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.client.EntityUtil;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelData;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class GuiModelInterface extends GuiNPCInterface{
public ModelData playerdata;
private static float rotation = 0;
private GuiNpcButton left,right,zoom,unzoom;
private static float zoomed = 60;
public int xOffset = 0;
public int yOffset = 0;
public EntityCustomNpc npc;
public GuiModelInterface(EntityCustomNpc npc){
this.npc = npc;
playerdata = npc.modelData;
@@ -70,7 +70,7 @@ public class GuiModelInterface extends GuiNPCInterface{
zoomed+=par3 * 2;
else if(unzoom.mousePressed(mc, par1, par2) && zoomed > 10)
zoomed-=par3 * 2;
}
this.drawDefaultBackground();
GL11.glColor4f(1, 1, 1, 1);
@@ -78,16 +78,16 @@ public class GuiModelInterface extends GuiNPCInterface{
EntityLivingBase entity = playerdata.getEntity(npc);
if(entity == null)
entity = this.npc;
EntityUtil.Copy(npc, entity);
int l = guiLeft + 190 + xOffset;
int i1 = guiTop + 180 + yOffset;
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
GL11.glPushMatrix();
GL11.glTranslatef(l, i1, 60F);
GL11.glScalef(-zoomed, zoomed, zoomed);
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
float f2 = entity.renderYawOffset;
@@ -128,7 +128,7 @@ public class GuiModelInterface extends GuiNPCInterface{
super.drawScreen(par1, par2, par3);
GL11.glPopMatrix();
}
@Override
public void keyTyped(char par1, int par2)
{
@@ -146,6 +146,6 @@ public class GuiModelInterface extends GuiNPCInterface{
@Override
public void save() {
// TODO Auto-generated method stub
}
}
@@ -11,12 +11,9 @@ import net.minecraft.util.ChatAllowedCharacters;
import noppes.npcs.NoppesStringUtils;
import noppes.npcs.client.ClientProxy;
import noppes.npcs.client.gui.util.TextContainer.LineData;
import noppes.npcs.config.ConfigClient;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import sun.font.TrueTypeFont;
import java.awt.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -9,7 +9,6 @@ import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.IResource;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.client.ImageDownloadAlt;
import noppes.npcs.client.gui.custom.GuiCustom;
import noppes.npcs.client.renderer.ImageBufferDownloadAlt;
import org.lwjgl.opengl.GL11;
@@ -8,8 +8,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.*;
import noppes.npcs.CustomItems;
import noppes.npcs.api.ISkinOverlay;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.client.model.animation.AniCrawling;
@@ -18,7 +17,6 @@ import noppes.npcs.client.model.part.*;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.client.model.util.ModelScaleRenderer;
import noppes.npcs.client.renderer.ImageData;
import noppes.npcs.client.renderer.RenderNPCInterface;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.controllers.data.*;
@@ -1,16 +1,16 @@
package noppes.npcs.client.model.part;
import net.minecraft.entity.Entity;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelBeard extends ModelPartInterface {
private Model2DRenderer model;
public ModelBeard(ModelMPM base) {
super(base);
model = new Model2DRenderer(base, 56, 20, 8, 12, 64, 32);
@@ -38,7 +38,7 @@ public class ModelBeard extends ModelPartInterface {
}
color = config.color;
isHidden = false;
if(!config.playerTexture){
location = config.getResource();
}
@@ -2,10 +2,10 @@ package noppes.npcs.client.model.part;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
public class ModelBreasts extends ModelPartInterface {
private Model2DRenderer breasts;
@@ -44,7 +44,7 @@ public class ModelBreasts extends ModelPartInterface {
right.setScale(0.12f, 0.14f);
right.setThickness(1.75f);
breasts3.addChild(right);
Model2DRenderer right2 = new Model2DRenderer(base, 20f, 22, 3, 1, width, height);
right2.setTextureSize(width, height);
right2.setRotationPoint(-3.8F, 4.1f, -3.14f);
@@ -52,7 +52,7 @@ public class ModelBreasts extends ModelPartInterface {
right2.setThickness(1.75f);
right2.rotateAngleX = (float) (Math.PI / 9);
breasts3.addChild(right2);
Model2DRenderer right3 = new Model2DRenderer(base, 20f, 24, 3, 1, width, height);
right3.setTextureSize(width, height);
right3.setRotationPoint(-3.8F, 5.3f, -3.6f);
@@ -60,7 +60,7 @@ public class ModelBreasts extends ModelPartInterface {
right3.setThickness(1.75f);
right3.rotateAngleX = (float) (-Math.PI / 9);
breasts3.addChild(right3);
Model2DRenderer right4 = new Model2DRenderer(base, 23f, 22, 1, 2, width, height);
right4.setTextureSize(width, height);
right4.setRotationPoint(-1.8f, 5.3f, -3.14f);
@@ -75,7 +75,7 @@ public class ModelBreasts extends ModelPartInterface {
left.setScale(0.12f, 0.14f);
left.setThickness(1.75f);
breasts3.addChild(left);
Model2DRenderer left2 = new Model2DRenderer(base, 25f, 22, 3, 1, width, height);
left2.setTextureSize(width, height);
left2.setRotationPoint(0.8F, 4.1f, -3.18f);
@@ -83,7 +83,7 @@ public class ModelBreasts extends ModelPartInterface {
left2.setThickness(1.75f);
left2.rotateAngleX = (float) (Math.PI / 9);
breasts3.addChild(left2);
Model2DRenderer left3 = new Model2DRenderer(base, 25f, 24, 3, 1, width, height);
left3.setTextureSize(width, height);
left3.setRotationPoint(0.8F, 5.3f, -3.6f);
@@ -91,7 +91,7 @@ public class ModelBreasts extends ModelPartInterface {
left3.setThickness(1.75f);
left3.rotateAngleX = (float) (-Math.PI / 9);
breasts3.addChild(left3);
Model2DRenderer left4 = new Model2DRenderer(base, 24f, 22, 1, 2, width, height);
left4.setTextureSize(width, height);
left4.setRotationPoint(0.8f, 5.3f, -3.6f);
@@ -1,16 +1,16 @@
package noppes.npcs.client.model.part;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelClaws extends ModelPartInterface {
private Model2DRenderer model;
private boolean isRight = false;
public ModelClaws(ModelMPM base, boolean isRight) {
super(base);
this.isRight = isRight;
@@ -34,7 +34,7 @@ public class ModelClaws extends ModelPartInterface {
}
color = config.color;
isHidden = false;
if(!config.playerTexture){
location = config.getResource();
}
@@ -1,18 +1,18 @@
package noppes.npcs.client.model.part;
import net.minecraft.client.model.ModelRenderer;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelEars extends ModelPartInterface {
private ModelRenderer ears;
private ModelRenderer bunny;
public ModelEars(ModelMPM par1ModelBase) {
super(par1ModelBase);
ears = new ModelRenderer(base);
this.addChild(ears);
@@ -42,10 +42,10 @@ public class ModelEars extends ModelPartInterface {
left2.setThickness(1.16f);
ears.addChild(left2);
bunny = new ModelRenderer(base);
this.addChild(bunny);
ModelRenderer earleft = new ModelRenderer(base, 56, 0);
earleft.mirror = true;
earleft.addBox(-1.466667F, -4F, 0F, 3, 7, 1);
@@ -68,7 +68,7 @@ public class ModelEars extends ModelPartInterface {
}
isHidden = false;
this.color = config.color;
ears.isHidden = config.type != 0;
bunny.isHidden = config.type != 1;
@@ -1,15 +1,15 @@
package noppes.npcs.client.model.part;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelFin extends ModelPartInterface {
private Model2DRenderer model;
public ModelFin(ModelMPM base) {
super(base);
model = new Model2DRenderer(base, 48, 8, 16, 24, 64, 32);
@@ -29,7 +29,7 @@ public class ModelFin extends ModelPartInterface {
}
color = config.color;
isHidden = false;
if(!config.playerTexture){
location = config.getResource();
}
@@ -2,15 +2,15 @@ package noppes.npcs.client.model.part;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelHair extends ModelPartInterface {
private Model2DRenderer model;
public ModelHair(ModelMPM base) {
super(base);
model = new Model2DRenderer(base, 56, 20, 8, 12, 64, 32);
@@ -2,21 +2,21 @@ package noppes.npcs.client.model.part;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.part.horns.ModelAntennasBack;
import noppes.npcs.client.model.part.horns.ModelAntennasFront;
import noppes.npcs.client.model.part.horns.ModelAntlerHorns;
import noppes.npcs.client.model.part.horns.ModelBullHorns;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelHorns extends ModelPartInterface {
private ModelRenderer bull;
private ModelRenderer antlers;
private ModelRenderer antennasBack;
private ModelRenderer antennasFront;
public ModelHorns(ModelMPM base) {
super(base);
@@ -42,12 +42,12 @@ public class ModelHorns extends ModelPartInterface {
}
color = config.color;
isHidden = false;
bull.isHidden = config.type != 0;
antlers.isHidden = config.type != 1;
antennasBack.isHidden = config.type != 2;
antennasFront.isHidden = config.type != 3;
if(!config.playerTexture){
location = config.getResource();
}
@@ -3,7 +3,6 @@ package noppes.npcs.client.model.part;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.ClientProxy;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.part.legs.ModelDigitigradeLegs;
@@ -13,6 +12,7 @@ import noppes.npcs.client.model.part.legs.ModelNagaLegs;
import noppes.npcs.client.model.util.ModelScaleRenderer;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
import org.lwjgl.opengl.GL11;
public class ModelLegs extends ModelScaleRenderer{
@@ -35,25 +35,25 @@ public class ModelLegs extends ModelScaleRenderer{
private ModelRenderer spiderLeg8;
private ModelRenderer spiderBody;
private ModelRenderer spiderNeck;
private ModelRenderer backLeftLeg;
private ModelRenderer backLeftShin;
private ModelRenderer backLeftHoof;
private ModelRenderer backRightLeg;
private ModelRenderer backRightShin;
private ModelRenderer backRightHoof;
private ModelRenderer frontLeftLeg;
private ModelRenderer frontLeftShin;
private ModelRenderer frontLeftHoof;
private ModelRenderer frontRightLeg;
private ModelRenderer frontRightShin;
private ModelRenderer frontRightHoof;
private ModelMPM base;
public ModelLegs(ModelMPM base, ModelScaleRenderer leg1, ModelScaleRenderer leg2, int textWidth, int textHeight) {
super(base);
@@ -73,62 +73,62 @@ public class ModelLegs extends ModelScaleRenderer{
spiderNeck.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6, var1);
spiderNeck.setRotationPoint(0.0F, (float)var2, 2.0F);
spider.addChild(spiderNeck);
spiderBody = new ModelRenderer(base, 0, 12);
spiderBody.setTextureSize(64,32);
spiderBody.addBox(-5.0F, -4.0F, -6.0F, 10, 8, 12, var1);
spiderBody.setRotationPoint(0.0F, (float)var2, 11.0F);
spider.addChild(spiderBody);
this.spiderLeg1 = new ModelRenderer(base, 18, 0);
this.spiderLeg1.setTextureSize(64,32);
this.spiderLeg1.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg1.setRotationPoint(-4.0F, (float)var2, 4.0F);
spider.addChild(spiderLeg1);
this.spiderLeg2 = new ModelRenderer(base, 18, 0);
this.spiderLeg2.setTextureSize(64,32);
this.spiderLeg2.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg2.setRotationPoint(4.0F, (float)var2, 4.0F);
spider.addChild(spiderLeg2);
this.spiderLeg3 = new ModelRenderer(base, 18, 0);
this.spiderLeg3.setTextureSize(64,32);
this.spiderLeg3.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg3.setRotationPoint(-4.0F, (float)var2, 3.0F);
spider.addChild(spiderLeg3);
this.spiderLeg4 = new ModelRenderer(base, 18, 0);
this.spiderLeg4.setTextureSize(64,32);
this.spiderLeg4.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg4.setRotationPoint(4.0F, (float)var2, 3.0F);
spider.addChild(spiderLeg4);
this.spiderLeg5 = new ModelRenderer(base, 18, 0);
this.spiderLeg5.setTextureSize(64,32);
this.spiderLeg5.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg5.setRotationPoint(-4.0F, (float)var2, 2.0F);
spider.addChild(spiderLeg5);
this.spiderLeg6 = new ModelRenderer(base, 18, 0);
this.spiderLeg6.setTextureSize(64,32);
this.spiderLeg6.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg6.setRotationPoint(4.0F, (float)var2, 2.0F);
spider.addChild(spiderLeg6);
this.spiderLeg7 = new ModelRenderer(base, 18, 0);
this.spiderLeg7.setTextureSize(64,32);
this.spiderLeg7.addBox(-15.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg7.setRotationPoint(-4.0F, (float)var2, 1.0F);
spider.addChild(spiderLeg7);
this.spiderLeg8 = new ModelRenderer(base, 18, 0);
this.spiderLeg8.setTextureSize(64,32);
this.spiderLeg8.addBox(-1.0F, -1.0F, -1.0F, 16, 2, 2, var1);
this.spiderLeg8.setRotationPoint(4.0F, (float)var2, 1.0F);
spider.addChild(spiderLeg8);
int zOffset = 10;
float yOffset = 7f;
horse = new ModelRenderer(base);
@@ -139,7 +139,7 @@ public class ModelLegs extends ModelScaleRenderer{
body.addBox(-5.0F, -8.0F, -19.0F, 10, 10, 24);
body.setRotationPoint(0.0F, 11.0F + yOffset, 9.0F + zOffset);
horse.addChild(body);
this.backLeftLeg = new ModelRenderer(base, 78, 29);
this.backLeftLeg.setTextureSize(128, 128);
this.backLeftLeg.addBox(-2.5F, -2.0F, -2.5F, 4, 9, 5);
@@ -155,7 +155,7 @@ public class ModelLegs extends ModelScaleRenderer{
this.backLeftHoof.addBox(-2.5F, 5.1F, -2.0F, 4, 3, 4);
this.backLeftHoof.setRotationPoint(0F, 7.0F, 0);
backLeftLeg.addChild(backLeftHoof);
this.backRightLeg = new ModelRenderer(base, 96, 29);
this.backRightLeg.setTextureSize(128, 128);
this.backRightLeg.addBox(-1.5F, -2.0F, -2.5F, 4, 9, 5);
@@ -171,7 +171,7 @@ public class ModelLegs extends ModelScaleRenderer{
this.backRightHoof.addBox(-1.5F, 5.1F, -2.0F, 4, 3, 4);
this.backRightHoof.setRotationPoint(0F, 7, 0);
backRightLeg.addChild(backRightHoof);
this.frontLeftLeg = new ModelRenderer(base, 44, 29);
this.frontLeftLeg.setTextureSize(128, 128);
this.frontLeftLeg.addBox(-1.9F, -1.0F, -2.1F, 3, 8, 4);
@@ -187,7 +187,7 @@ public class ModelLegs extends ModelScaleRenderer{
this.frontLeftHoof.addBox(-2.4F, 5.1F, -2.1F, 4, 3, 4);
this.frontLeftHoof.setRotationPoint(.0F, 7.0F, 0F);
frontLeftLeg.addChild(frontLeftHoof);
this.frontRightLeg = new ModelRenderer(base, 60, 29);
this.frontRightLeg.setTextureSize(128, 128);
this.frontRightLeg.addBox(-1.1F, -1.0F, -2.1F, 3, 8, 4);
@@ -234,7 +234,7 @@ public class ModelLegs extends ModelScaleRenderer{
ModelPartData part = this.entity.modelData.legParts;
rotationPointZ = 0;
rotationPointY = 0;
if(base.isArmor)
return;
if(part.type == 2){
@@ -242,7 +242,7 @@ public class ModelLegs extends ModelScaleRenderer{
spiderBody.rotationPointY = 15;
spiderBody.rotationPointZ = 11;
spiderNeck.rotateAngleX = 0;
float var8 = ((float)Math.PI / 4F);
this.spiderLeg1.rotateAngleZ = -var8;
this.spiderLeg2.rotateAngleZ = var8;
@@ -287,7 +287,7 @@ public class ModelLegs extends ModelScaleRenderer{
this.spiderLeg7.rotateAngleZ += var18;
this.spiderLeg8.rotateAngleZ += -var18;
if(base.isSneak){
rotationPointZ = 5;
rotationPointY = -1;
@@ -303,7 +303,7 @@ public class ModelLegs extends ModelScaleRenderer{
}
}
else if(part.type == 3){
this.frontLeftLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * .4F * par2;
this.frontLeftLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * .4F * par2;
this.frontRightLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * .4F * par2;
this.backLeftLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * .4F * par2;
this.backRightLeg.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * .4F * par2;
@@ -331,7 +331,7 @@ public class ModelLegs extends ModelScaleRenderer{
digitigrade.setRotationAngles(par1, par2, par3, par4, par5, par6, entity);
}
}
@Override
public void render(float par1)
{
@@ -367,7 +367,7 @@ public class ModelLegs extends ModelScaleRenderer{
mermaid.isHidden = part.type != 4;
mermaid2.isHidden = part.type != 6;
digitigrade.isHidden = part.type != 5;
if(!horse.isHidden){
x = 0;
y *= 1.8f;
@@ -398,7 +398,7 @@ public class ModelLegs extends ModelScaleRenderer{
GL11.glColor4f(1, 1, 1, base.alpha);
}
GL11.glPopMatrix();
}
public void setData(EntityCustomNpc entity) {
this.entity = entity;
@@ -1,11 +1,11 @@
package noppes.npcs.client.model.part;
import net.minecraft.entity.Entity;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelMohawk extends ModelPartInterface {
private Model2DRenderer model;
@@ -22,7 +22,7 @@ public class ModelMohawk extends ModelPartInterface {
@Override
public void setRotationAngles(float par1, float par2, float par3,
float par4, float par5, float par6, Entity entity) {
}
@@ -37,7 +37,7 @@ public class ModelMohawk extends ModelPartInterface {
color = config.color;
isHidden = false;
location = config.getResource();
}
}
@@ -3,11 +3,11 @@ package noppes.npcs.client.model.part;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.client.model.util.ModelPlaneRenderer;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import org.lwjgl.opengl.GL11;
public class ModelSkirt extends ModelPartInterface {
@@ -22,7 +22,7 @@ public class ModelSkirt extends ModelPartInterface {
Shape1 = new ModelPlaneRenderer(base, 58, 18);
Shape1.setTextureSize(64,32);
Shape1.addSidePlane(0, 0, 0, 9, 2);
ModelPlaneRenderer part1 = new ModelPlaneRenderer(base, 58, 18);
part1.setTextureSize(64,32);
part1.addSidePlane(2, 0, 0, 9, 2);
@@ -2,10 +2,10 @@ package noppes.npcs.client.model.part;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelSnout extends ModelPartInterface {
private ModelRenderer small;
@@ -13,10 +13,10 @@ public class ModelSnout extends ModelPartInterface {
private ModelRenderer large;
private ModelRenderer bunny;
private ModelRenderer beak;
public ModelSnout(ModelMPM base) {
super(base);
small = new ModelRenderer(base, 24, 0);
small.setTextureSize(64,32);
small.addBox(0F, 0F, 0F, 4, 3, 1);
@@ -34,13 +34,13 @@ public class ModelSnout extends ModelPartInterface {
large.addBox(0F, 0F, 0F, 4, 3, 3);
large.setRotationPoint(-2F, -3F, -7F);
this.addChild(large);
bunny = new ModelRenderer(base, 24, 0);
bunny.setTextureSize(64,32);
bunny.addBox(1F, 1F, 0F, 4, 2, 1);
bunny.setRotationPoint(-3F, -4F, -5F);
this.addChild(bunny);
ModelRenderer tooth = new ModelRenderer(base, 24, 3);
tooth.setTextureSize(64,32);
tooth.addBox(2F, 3f, 0F, 2, 1, 1);
@@ -75,7 +75,7 @@ public class ModelSnout extends ModelPartInterface {
large.isHidden = config.type != 2;
bunny.isHidden = config.type != 3;
beak.isHidden = config.type != 4;
if(!config.playerTexture){
location = config.getResource();
}
@@ -5,19 +5,19 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.ClientProxy;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.part.tails.*;
import noppes.npcs.client.model.util.ModelScaleRenderer;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelPartData;
import org.lwjgl.opengl.GL11;
public class ModelTail extends ModelScaleRenderer {
private EntityCustomNpc entity;
private ModelMPM base;
private ModelRenderer tail;
private ModelRenderer dragon;
private ModelRenderer squirrel;
@@ -25,11 +25,11 @@ public class ModelTail extends ModelScaleRenderer {
private ModelRenderer fin;
private ModelRenderer rodent;
private ModelRenderer feather;
private int color = 0xFFFFFF;
private ResourceLocation location = null;
public ModelTail(ModelMPM base) {
super(base);
this.base = base;
@@ -41,7 +41,7 @@ public class ModelTail extends ModelScaleRenderer {
tail.setRotationPoint(0F, 0, 1F);
setRotation(tail, 0.8714253F, 0F, 0F);
this.addChild(tail);
horse = new ModelRenderer(base);
horse.setTextureSize(32, 32);
horse.setRotationPoint(0, -1, 1);
@@ -79,14 +79,14 @@ public class ModelTail extends ModelScaleRenderer {
this.entity = entity;
initData(entity);
}
public void setRotationAngles(float par1, float par2, float par3,
float par4, float par5, float par6, Entity entity) {
if(this.entity==null) return;
rotateAngleY = MathHelper.cos(par1 * 0.6662F) * 0.3f * par2;
rotateAngleX = MathHelper.sin(par3 * 0.067F) * 0.05F;
if(this.entity.modelData.legParts.type == 2){
rotationPointY = 13f;
rotationPointZ = 14 * this.entity.modelData.modelScale.legs.scaleZ;
@@ -2,27 +2,27 @@ package noppes.npcs.client.model.part;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.client.model.util.Model2DRenderer;
import noppes.npcs.client.model.util.ModelPartInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class ModelWings extends ModelPartInterface {
private Model2DRenderer lWing;
private Model2DRenderer rWing;
public ModelWings(ModelMPM base) {
super(base);
lWing = new Model2DRenderer(base, 48, 32, 16, 32, 64, 32);
lWing.mirror = true;
lWing.setRotationPoint(2F, 4, 2F);
lWing.setRotationOffset(-16, -12);
setRotation(lWing, 0.7141593F, -0.5235988F, -0.5090659F);
this.addChild(lWing);
rWing = new Model2DRenderer(base, 48, 32, 16, 32, 64, 32);
rWing.setRotationPoint(-2F, 4F, 2F);
rWing.setRotationOffset(-16, -12);
@@ -35,7 +35,7 @@ public class ModelWings extends ModelPartInterface {
float par4, float par5, float par6, Entity entity) {
rWing.rotateAngleX = 0.7141593F;
rWing.rotateAngleZ = 0.5090659F;
lWing.rotateAngleX = 0.7141593F;
lWing.rotateAngleZ = -0.5090659F;
@@ -4,11 +4,11 @@ import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.client.ClientProxy;
import noppes.npcs.client.model.ModelMPM;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import org.lwjgl.opengl.GL11;
public abstract class ModelPartInterface extends ModelRenderer {
@@ -18,7 +18,7 @@ public abstract class ModelPartInterface extends ModelRenderer {
public float scale = 1;
protected ResourceLocation location;
public int color = 0xFFFFFF;
public ModelMPM base;
public ModelPartInterface(ModelMPM par1ModelBase) {
@@ -1,13 +1,11 @@
package noppes.npcs.client.renderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.ITextureObject;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.IResource;
import net.minecraft.client.resources.SkinManager;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.client.ImageDownloadAlt;
import noppes.npcs.client.renderer.ImageBufferDownloadAlt;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
@@ -16,7 +16,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.controllers.data.SkinOverlay;
@@ -153,7 +152,7 @@ public class RenderCNPCPlayer extends RenderPlayer {
}
protected void func_96449_a(AbstractClientPlayer p_96449_1_, double p_96449_2_, double p_96449_4_, double p_96449_6_, String p_96449_8_, float p_96449_9_, double p_96449_10_) {}
public void renderHand(float partialTicks, int renderPass) {
Minecraft mc = Minecraft.getMinecraft();
EntityRenderer entityRenderer = mc.entityRenderer;
@@ -2,7 +2,6 @@ package noppes.npcs.client.renderer;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
import kamkeel.addon.GeckoAddon;
import kamkeel.addon.client.GeckoAddonClient;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
@@ -29,7 +28,6 @@ import noppes.npcs.constants.EnumStandingType;
import noppes.npcs.controllers.data.SkinOverlay;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import org.lwjgl.Sys;
import org.lwjgl.opengl.GL11;
import javax.imageio.ImageIO;
@@ -3,13 +3,10 @@ package noppes.npcs.client.renderer.blocks;
import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
@@ -26,11 +23,11 @@ public class BlockBannerRenderer extends BlockRendererInterface{
private final ModelBanner model = new ModelBanner();
private final ModelBannerFlag flag = new ModelBannerFlag();
public static final ResourceLocation resourceFlag = new ResourceLocation("customnpcs","textures/models/BannerFlag.png");
public BlockBannerRenderer(){
((BlockBanner)CustomItems.banner).renderId = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(this);
@@ -48,7 +45,7 @@ public class BlockBannerRenderer extends BlockRendererInterface{
GL11.glRotatef(180, 0, 0, 1);
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
GL11.glColor3f(1, 1, 1);
setMaterialTexture(var1.getBlockMetadata());
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
@@ -151,7 +148,7 @@ public class BlockBannerRenderer extends BlockRendererInterface{
public int getRenderId() {
return CustomItems.banner.getRenderType();
}
public int specialRenderDistance(){
return 26;
}
@@ -4,7 +4,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.entity.Entity;
@@ -21,6 +20,7 @@ import noppes.npcs.items.ItemScripted;
import noppes.npcs.scripted.item.ScriptCustomItem;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import java.util.Random;
import static net.minecraft.client.renderer.entity.RenderItem.renderInFrame;
@@ -3,8 +3,6 @@ package noppes.npcs.config;
import cpw.mods.fml.common.FMLLog;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import noppes.npcs.CustomNpcs;
import noppes.npcs.config.legacy.LegacyConfig;
import org.apache.logging.log4j.Level;
import java.io.File;
@@ -60,4 +58,4 @@ public class ConfigMixin
}
}
}
}
}
@@ -18,8 +18,6 @@ import noppes.npcs.client.gui.custom.components.CustomGuiSlot;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.gui.ScriptGui;
import java.util.Iterator;
public class ContainerCustomGui extends Container {
public ScriptGui customGui;
public IInventory guiInventory;
@@ -12,7 +12,9 @@ import noppes.npcs.controllers.data.PlayerData;
import noppes.npcs.util.NBTJsonUtil;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.zip.GZIPInputStream;
public class AnimationController implements IAnimationHandler {
@@ -12,12 +12,18 @@ import net.minecraft.util.ChatComponentText;
import noppes.npcs.CustomNpcs;
import noppes.npcs.LogWriter;
import noppes.npcs.config.ConfigMain;
import noppes.npcs.controllers.data.*;
import noppes.npcs.controllers.data.Bank;
import noppes.npcs.controllers.data.PlayerBankData;
import noppes.npcs.controllers.data.PlayerData;
import noppes.npcs.controllers.data.PlayerMail;
import noppes.npcs.util.CacheHashMap;
import noppes.npcs.util.NBTJsonUtil;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.zip.GZIPInputStream;
@@ -576,4 +582,4 @@ public class PlayerDataController {
executor.shutdown();
}
}
}
@@ -13,7 +13,10 @@ import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.controllers.data.IScriptHandler;
import noppes.npcs.scripted.NpcAPI;
import javax.script.*;
import javax.script.Compilable;
import javax.script.CompiledScript;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Method;
@@ -2,10 +2,8 @@ package noppes.npcs.controllers;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.CustomNpcs;
import noppes.npcs.LogWriter;
import noppes.npcs.controllers.data.Faction;
import noppes.npcs.controllers.data.TagMap;
import java.io.*;
@@ -8,8 +8,6 @@ import noppes.npcs.LogWriter;
import noppes.npcs.api.handler.ITagHandler;
import noppes.npcs.api.handler.data.ITag;
import noppes.npcs.controllers.data.Tag;
import noppes.npcs.controllers.data.TagMap;
import scala.Int;
import java.io.*;
import java.util.*;
@@ -2,7 +2,6 @@ package noppes.npcs.controllers.data;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.api.handler.data.IAnimation;
@@ -10,13 +10,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import noppes.npcs.DataDisplay;
import noppes.npcs.Server;
import noppes.npcs.api.handler.data.IAnimationData;
import noppes.npcs.api.handler.data.IAnimation;
import noppes.npcs.client.Client;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.api.handler.data.IAnimationData;
import noppes.npcs.constants.EnumAnimationPart;
import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.constants.EnumPacketServer;
import noppes.npcs.controllers.PlayerDataController;
import noppes.npcs.entity.EntityNPCInterface;
@@ -15,20 +15,19 @@ import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.containers.ContainerNPCBankInterface;
import noppes.npcs.controllers.BankController;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.util.CustomNPCsThreader;
import java.util.HashMap;
public class BankData {
public HashMap<Integer,NpcMiscInventory> itemSlots;
public HashMap<Integer,Boolean> upgradedSlots;
public HashMap<Integer,NpcMiscInventory> itemSlots;
public HashMap<Integer,Boolean> upgradedSlots;
public int unlockedSlots = 0;
public int bankId = -1;
public BankData(){
itemSlots = new HashMap<Integer,NpcMiscInventory>();
upgradedSlots = new HashMap<Integer,Boolean>();
for(int i = 0; i < 6; i++){
itemSlots.put(i, new NpcMiscInventory(54));
upgradedSlots.put(i, false);
@@ -63,7 +62,7 @@ public class BankData {
for(int slot: items.keySet()){
NBTTagCompound nbttagcompound = new NBTTagCompound();
nbttagcompound.setInteger("Slot", slot);
nbttagcompound.setTag("BankItems",items.get(slot).getToNBT());
list.appendTag(nbttagcompound);
}
@@ -74,16 +73,16 @@ public class BankData {
return true;
return bank.canBeUpgraded(slot) && upgradedSlots.get(slot);
}
public void openBankGui(final EntityPlayer player, EntityNPCInterface npc, int bankId, int slot) {
final Bank bank = BankController.getInstance().getBank(bankId);
if(bank.getMaxSlots() <= slot)
return;
if(bank.startSlots > unlockedSlots)
unlockedSlots = bank.startSlots;
ItemStack currency = null;
if(unlockedSlots <= slot){
currency = bank.currencyInventory.getStackInSlot(slot);
@@ -115,7 +114,7 @@ public class BankData {
Container con = player.openContainer;
if(con == null || !(con instanceof ContainerNPCBankInterface))
return null;
return (ContainerNPCBankInterface) con;
}
}
@@ -14,8 +14,11 @@ import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.controllers.ScriptContainer;
import noppes.npcs.controllers.ScriptController;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
public class ForgeDataScript implements INpcScriptHandler {
private List<ScriptContainer> scripts = new ArrayList();
@@ -2,7 +2,6 @@ package noppes.npcs.controllers.data;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.api.handler.data.IAnimation;
import noppes.npcs.api.handler.data.IFrame;
import noppes.npcs.api.handler.data.IFramePart;
import noppes.npcs.constants.EnumAnimationPart;
@@ -6,7 +6,6 @@
package noppes.npcs.controllers.data;
import cpw.mods.fml.common.eventhandler.Event;
import noppes.npcs.constants.EnumScriptType;
import noppes.npcs.controllers.ScriptContainer;
import java.util.List;
@@ -18,7 +18,10 @@ import noppes.npcs.controllers.QuestController;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.UUID;
public class Party {
private final UUID partyUUID;
@@ -152,7 +155,7 @@ public class Party {
// Remove New Leader
partyOrder.remove(uuid);
// Add New Leader to Front
partyOrder.add(0, uuid);
@@ -7,8 +7,10 @@ import noppes.npcs.*;
import noppes.npcs.api.IContainer;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.handler.data.*;
import noppes.npcs.config.ConfigMain;
import noppes.npcs.constants.*;
import noppes.npcs.constants.EnumPacketClient;
import noppes.npcs.constants.EnumQuestCompletion;
import noppes.npcs.constants.EnumQuestRepeat;
import noppes.npcs.constants.EnumQuestType;
import noppes.npcs.controllers.PlayerDataController;
import noppes.npcs.controllers.QuestController;
import noppes.npcs.quests.*;
@@ -30,15 +32,15 @@ public class Quest implements ICompatibilty, IQuest {
public String nextQuestTitle = "";
public PlayerMail mail = new PlayerMail();
public String command = "";
public QuestInterface questInterface = new QuestItem();
public int rewardExp = 0;
public NpcMiscInventory rewardItems = new NpcMiscInventory(9);
public boolean randomReward = false;
public FactionOptions factionOptions = new FactionOptions();
public PartyOptions partyOptions = new PartyOptions();
public void readNBT(NBTTagCompound compound) {
id = compound.getInteger("Id");
@@ -47,7 +49,7 @@ public class Quest implements ICompatibilty, IQuest {
public void readNBTPartial(NBTTagCompound compound) {
version = compound.getInteger("ModRev");
VersionCompatibility.CheckAvailabilityCompatibility(this, compound);
setType(EnumQuestType.values()[compound.getInteger("Type")]);
title = compound.getString("Title");
logText = compound.getString("Text");
@@ -63,15 +65,15 @@ public class Quest implements ICompatibilty, IQuest {
randomReward = compound.getBoolean("RandomReward");
rewardExp = compound.getInteger("RewardExp");
rewardItems.setFromNBT(compound.getCompoundTag("Rewards"));
completion = EnumQuestCompletion.values()[compound.getInteger("QuestCompletion")];
repeat = EnumQuestRepeat.values()[compound.getInteger("QuestRepeat")];
questInterface.readEntityFromNBT(compound);
factionOptions.readFromNBT(compound.getCompoundTag("QuestFactionPoints"));
partyOptions.readFromNBT(compound.getCompoundTag("PartyOptions"));
mail.readNBT(compound.getCompoundTag("QuestMail"));
}
@@ -85,7 +87,7 @@ public class Quest implements ICompatibilty, IQuest {
questInterface = new QuestKill();
else if(type == EnumQuestType.Location)
questInterface = new QuestLocation();
if(questInterface != null)
questInterface.questId = id;
}
@@ -110,7 +112,7 @@ public class Quest implements ICompatibilty, IQuest {
compound.setInteger("QuestCompletion", completion.ordinal());
compound.setInteger("QuestRepeat", repeat.ordinal());
this.questInterface.writeEntityToNBT(compound);
compound.setTag("QuestFactionPoints", factionOptions.writeToNBT(new NBTTagCompound()));
compound.setTag("PartyOptions", partyOptions.writeToNBT());
@@ -118,7 +120,7 @@ public class Quest implements ICompatibilty, IQuest {
return compound;
}
public boolean hasNewQuest()
{
return getNextQuest() != null;
@@ -156,7 +158,7 @@ public class Quest implements ICompatibilty, IQuest {
}
return 0L;
}
@Override
public int getVersion() {
return version;
@@ -1,12 +1,7 @@
package noppes.npcs.controllers.data;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import noppes.npcs.api.ISkinOverlay;
import noppes.npcs.client.ClientCacheHandler;
import noppes.npcs.client.renderer.ImageData;
import noppes.npcs.entity.data.DataSkinOverlays;
public class SkinOverlay implements ISkinOverlay {
@@ -5,10 +5,10 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.CustomNpcs;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.VersionCompatibility;
import noppes.npcs.client.EntityUtil;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
public class EntityCustomNpc extends EntityNPCFlying {
public ModelData modelData = new ModelData();
@@ -47,7 +47,7 @@ public class EntityCustomNpc extends EntityNPCFlying {
entity.onUpdate();
}
catch(Exception e){
}
EntityUtil.Copy(this, entity);
}
@@ -59,7 +59,7 @@ public class EntityCustomNpc extends EntityNPCFlying {
super.mountEntity(par1Entity);
updateHitbox();
}
@Override
public void updateHitbox() {
Entity entity = modelData.getEntity(this);
@@ -82,4 +82,3 @@ public class EntityCustomNpc extends EntityNPCFlying {
}
}
@@ -1,16 +1,16 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCGolem extends EntityNPCInterface
@@ -24,7 +24,7 @@ public class EntityNPCGolem extends EntityNPCInterface
width = 1.4f;
height = 2.5f;
}
public void updateHitbox() {
currentAnimation = EnumAnimation.values()[dataWatcher.getWatchableObjectInt(14)];
if(currentAnimation == EnumAnimation.LYING){
@@ -45,16 +45,16 @@ public class EntityNPCGolem extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
ModelData data = npc.modelData;
data.setEntityClass(EntityNPCGolem.class);
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
}
}
}
@@ -1,6 +1,5 @@
package noppes.npcs.entity;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
@@ -54,7 +53,7 @@ public class EntityProjectile extends EntityThrowable {
private int inData = 0;
public int throwableShake = 0;
public int arrowShake = 0;
public boolean canBePickedUp = false;
public boolean destroyedOnEntityHit = true;
@@ -67,15 +66,15 @@ public class EntityProjectile extends EntityThrowable {
private String throwerName = null;
private int ticksInGround;
public int ticksInAir = 0;
private double accelerationX;
private double accelerationY;
private double accelerationZ;
/**
* Properties settable by GUI
*/
public float damage = 5;
public int punch = 0;
public boolean accelerate = false;
@@ -91,13 +90,13 @@ public class EntityProjectile extends EntityThrowable {
public IProjectileCallback callback;
public ItemStack callbackItem;
public List<ScriptContainer> scripts = new ArrayList<ScriptContainer>();
public EntityProjectile(World par1World)
{
super(par1World);
this.setSize(0.25F, 0.25F);
}
protected void entityInit() {
this.dataWatcher.addObjectByDataType(21, 5);
this.dataWatcher.addObject(22, String.valueOf(""));//particle
@@ -113,7 +112,7 @@ public class EntityProjectile extends EntityThrowable {
}
@SideOnly(Side.CLIENT)
/**
* Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
* length * 64 * renderDistanceWeight Args: distance
@@ -124,7 +123,7 @@ public class EntityProjectile extends EntityThrowable {
d1 *= 64.0D;
return par1 < d1 * d1;
}
public EntityProjectile(World par1World, EntityLivingBase par2EntityLiving, ItemStack item, boolean isNPC)
{
super(par1World);
@@ -140,24 +139,24 @@ public class EntityProjectile extends EntityThrowable {
this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.1F);
this.setPosition(this.posX, this.posY, this.posZ);
this.yOffset = 0.0F;
if (isNPC) {
this.npc = (EntityNPCInterface) this.thrower;
this.getStatProperties(this.npc.stats);
this.destroyTerrain = !this.npc.stats.projectilesKeepTerrain;
}
}
public void setThrownItem(ItemStack item){
dataWatcher.updateObject(21, item);
}
/**
* Par: X, Y, Z, Angle, Accuracy
*/
@Override
public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8)
{
{
float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
float f3 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
float yaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI);
@@ -178,7 +177,7 @@ public class EntityProjectile extends EntityThrowable {
this.accelerationZ = par5 / f2 * 0.1D;
this.ticksInGround = 0;
}
/**
* get an angle for firing at coordinates XYZ
* Par: X Distance, Y Distance, Z Distance, Horizontial Distance
@@ -201,7 +200,7 @@ public class EntityProjectile extends EntityThrowable {
double varY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
this.setThrowableHeading(varX, varY, varZ, -rotationPitch, speed);
}
@SideOnly(Side.CLIENT)
/**
@@ -215,7 +214,7 @@ public class EntityProjectile extends EntityThrowable {
this.setPosition(par1, par3, par5);
this.setRotation(par7, par8);
}
@Override
public void onUpdate()
{
@@ -236,9 +235,9 @@ public class EntityProjectile extends EntityThrowable {
this.rotationPitch -= 20;
}
}
if (this.effect == EnumPotionType.Fire && !this.inGround)
if (this.effect == EnumPotionType.Fire && !this.inGround)
this.setFire(1);
Block block = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile);
@@ -257,7 +256,7 @@ public class EntityProjectile extends EntityThrowable {
{
--this.arrowShake;
}
if (this.inGround)
{
int j = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
@@ -293,7 +292,7 @@ public class EntityProjectile extends EntityThrowable {
MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec31, false, true, false);//rayTraceBlocks_do_do
vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
vec31 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
if (movingobjectposition != null)
{
vec31 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
@@ -304,21 +303,21 @@ public class EntityProjectile extends EntityThrowable {
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
double d0 = 0.0D;
EntityLivingBase entityliving = this.getThrower();
for (int k = 0; k < list.size(); ++k)
{
Entity entity1 = (Entity)list.get(k);
if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.thrower) || this.ticksInAir >= 25))
{
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31);
if (movingobjectposition1 != null)
{
double d1 = vec3.distanceTo(movingobjectposition1.hitVec);
if (d1 < d0 || d0 == 0.0D)
{
entity = entity1;
@@ -327,7 +326,7 @@ public class EntityProjectile extends EntityThrowable {
}
}
}
if (entity != null)
{
movingobjectposition = new MovingObjectPosition(entity);
@@ -341,7 +340,7 @@ public class EntityProjectile extends EntityThrowable {
}
}
}
if (movingobjectposition != null)
{
if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK && this.worldObj.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ) == Blocks.portal)
@@ -354,33 +353,33 @@ public class EntityProjectile extends EntityThrowable {
this.onImpact(movingobjectposition);
}
}
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
{
this.prevRotationYaw += 360.0F;
}
float f = this.isArrow() ? 0.0F : 225.0F;
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) + f * 0.2F;
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
@@ -390,7 +389,7 @@ public class EntityProjectile extends EntityThrowable {
}
float f2 = this.getMotionFactor();
float f3 = this.getGravityVelocity();
if (this.isInWater())
{
if(worldObj.isRemote){
@@ -400,24 +399,24 @@ public class EntityProjectile extends EntityThrowable {
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ);
}
}
f2 = 0.8F;
}
this.motionX *= (double)f2;
this.motionY *= (double)f2;
this.motionZ *= (double)f2;
if (hasGravity())
this.motionY -= (double)f3;
if (accelerate)
{
this.motionX += this.accelerationX;
this.motionY += this.accelerationY;
this.motionZ += this.accelerationZ;
}
if (worldObj.isRemote && !this.dataWatcher.getWatchableObjectString(22).equals("")){
this.worldObj.spawnParticle(this.dataWatcher.getWatchableObjectString(22), this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
@@ -431,14 +430,14 @@ public class EntityProjectile extends EntityThrowable {
return false;
return item.getItem() instanceof ItemBlock;
}
private Item getItem(){
ItemStack item = this.getItemDisplay();
if(item == null)
return null;
return item.getItem();
}
protected float getMotionFactor()
{
return accelerate ? 0.95F : 1.0F;
@@ -479,18 +478,18 @@ public class EntityProjectile extends EntityThrowable {
if (movingobjectposition.entityHit instanceof EntityLivingBase && (this.isArrow() || this.sticksToWalls()))
{
EntityLivingBase entityliving = (EntityLivingBase)movingobjectposition.entityHit;
if (!this.worldObj.isRemote)
{
entityliving.setArrowCountInEntity(entityliving.getArrowCountInEntity() + 1);
}
if (destroyedOnEntityHit && !(movingobjectposition.entityHit instanceof EntityEnderman))
{
this.setDead();
}
}
if (this.isBlock())
{
this.worldObj.playAuxSFX(2001, (int) movingobjectposition.entityHit.posX, (int) movingobjectposition.entityHit.posY, (int) movingobjectposition.entityHit.posZ, Item.getIdFromItem(getItem()));
@@ -502,17 +501,17 @@ public class EntityProjectile extends EntityThrowable {
this.worldObj.spawnParticle("iconcrack_" + Item.getIdFromItem(getItem()), this.posX, this.posY, this.posZ, this.rand.nextGaussian() * 0.15D, this.rand.nextGaussian() * 0.2D, this.rand.nextGaussian() * 0.15D);
}
}
if (this.punch > 0)
{
float f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
if (f3 > 0.0F)
{
movingobjectposition.entityHit.addVelocity(this.motionX * (double)this.punch * 0.6000000238418579D / (double)f3, 0.1D, this.motionZ * (double)this.punch * 0.6000000238418579D / (double)f3);
}
}
if (this.effect != EnumPotionType.None && movingobjectposition.entityHit instanceof EntityLivingBase)
{
if (this.effect != EnumPotionType.Fire)
@@ -525,7 +524,7 @@ public class EntityProjectile extends EntityThrowable {
movingobjectposition.entityHit.setFire(duration);
}
}
}
}
else if (this.hasGravity() && (this.isArrow() || this.sticksToWalls()))
{
this.motionX *= -0.10000000149011612D;
@@ -562,11 +561,11 @@ public class EntityProjectile extends EntityThrowable {
else
this.playSound("random.break", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.arrowShake = 7;
if (!this.hasGravity()) {
this.dataWatcher.updateObject(26, Byte.valueOf((byte) 1));
}
if (this.inTile != null)
{//onEntityCollidedWithBlock
inTile.onEntityCollidedWithBlock(this.worldObj, this.xTile, this.yTile, this.zTile, this);
@@ -587,8 +586,8 @@ public class EntityProjectile extends EntityThrowable {
}
}
}
if (explosive){
if (this.explosiveRadius != 0 || this.effect == EnumPotionType.None){
boolean terraindamage = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing") && explosiveDamage && destroyTerrain;
@@ -609,9 +608,9 @@ public class EntityProjectile extends EntityThrowable {
}
}
}
if (this.explosiveRadius != 0 && (this.isArrow() || this.sticksToWalls()))
if (this.explosiveRadius != 0 && (this.isArrow() || this.sticksToWalls()))
this.setDead();
}
}
else if (this.effect == EnumPotionType.Fire){
int i = movingobjectposition.blockX;
int j = movingobjectposition.blockY;
@@ -686,14 +685,14 @@ public class EntityProjectile extends EntityThrowable {
}
this.worldObj.playAuxSFX(2002, (int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ), this.getPotionColor(this.effect));
}
}
}
if (!this.worldObj.isRemote && !this.isArrow() && !this.sticksToWalls())
{
this.setDead();
}
}
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
par1NBTTagCompound.setShort("xTile", (short)this.xTile);
@@ -717,7 +716,7 @@ public class EntityProjectile extends EntityThrowable {
{
par1NBTTagCompound.setTag("Item", this.getItemDisplay().writeToNBT(new NBTTagCompound()));
}
par1NBTTagCompound.setFloat("damagev2", damage);
par1NBTTagCompound.setInteger("punch", punch);
par1NBTTagCompound.setInteger("size", this.dataWatcher.getWatchableObjectInt(23));
@@ -740,7 +739,7 @@ public class EntityProjectile extends EntityThrowable {
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
{
this.xTile = par1NBTTagCompound.getShort("xTile");
this.yTile = par1NBTTagCompound.getShort("yTile");
this.zTile = par1NBTTagCompound.getShort("zTile");
@@ -751,7 +750,7 @@ public class EntityProjectile extends EntityThrowable {
this.dataWatcher.updateObject(27, par1NBTTagCompound.getByte("isArrow"));
this.throwerName = par1NBTTagCompound.getString("ownerName");
this.canBePickedUp = par1NBTTagCompound.getBoolean("canBePickedUp");
this.damage = par1NBTTagCompound.getFloat("damagev2");
this.punch = par1NBTTagCompound.getInteger("punch");
this.explosiveRadius = par1NBTTagCompound.getInteger("explosiveRadius");
@@ -780,7 +779,7 @@ public class EntityProjectile extends EntityThrowable {
this.motionY = nbttaglist.func_150309_d(1);
this.motionZ = nbttaglist.func_150309_d(2);
}
NBTTagCompound var2 = par1NBTTagCompound.getCompoundTag("Item");
ItemStack item = ItemStack.loadItemStackFromNBT(var2);
@@ -801,12 +800,12 @@ public class EntityProjectile extends EntityThrowable {
this.thrower = this.worldObj.func_152378_a(uuid);
}
catch(IllegalArgumentException ex){
}
return this.thrower;
}
private int getPotionEffect(EnumPotionType p) {
switch(p)
{
@@ -820,7 +819,7 @@ public class EntityProjectile extends EntityThrowable {
default : return 0;
}
}
private int getPotionColor(EnumPotionType p) {
switch(p)
{
@@ -834,7 +833,7 @@ public class EntityProjectile extends EntityThrowable {
default : return 0;
}
}
public void getStatProperties(DataStats stats)
{
this.damage = stats.pDamage;
@@ -857,9 +856,9 @@ public class EntityProjectile extends EntityThrowable {
public void setParticleEffect(EnumParticleType type){
this.dataWatcher.updateObject(22, type.particleName);
}
public void setHasGravity(boolean bo){
this.dataWatcher.updateObject(26, Byte.valueOf((byte) (bo ? 1 : 0)));
this.dataWatcher.updateObject(26, Byte.valueOf((byte) (bo ? 1 : 0)));
}
public void setIs3D(boolean bo){
this.dataWatcher.updateObject(28, Byte.valueOf((byte) (bo ? 1 : 0)));
@@ -867,11 +866,11 @@ public class EntityProjectile extends EntityThrowable {
public void setStickInWall(boolean bo){
this.dataWatcher.updateObject(30, Byte.valueOf((byte) (bo ? 1 : 0)));
}
public ItemStack getItemDisplay() {
return dataWatcher.getWatchableObjectItemStack(21);
}
public float getBrightness(float par1)
{
return this.dataWatcher.getWatchableObjectByte(24) == 1 ? 1.0F : super.getBrightness(par1);
@@ -882,19 +881,19 @@ public class EntityProjectile extends EntityThrowable {
{
return this.dataWatcher.getWatchableObjectByte(24) == 1 ? 15728880 : super.getBrightnessForRender(par1);
}
public boolean hasGravity() {
return this.dataWatcher.getWatchableObjectByte(26) == 1;
}
public void setSpeed(int speed) {
this.dataWatcher.updateObject(25, speed);
}
public float getSpeed() {
return this.dataWatcher.getWatchableObjectInt(25) / 10.0F;
}
public boolean isArrow() {
return this.dataWatcher.getWatchableObjectByte(27) == 1;
}
@@ -902,19 +901,19 @@ public class EntityProjectile extends EntityThrowable {
public void setRotating(boolean bo) {
dataWatcher.updateObject(29, Byte.valueOf((byte) (bo ? 1 : 0)));
}
public boolean isRotating() {
return this.dataWatcher.getWatchableObjectByte(29) == 1;
}
public boolean glows() {
return this.dataWatcher.getWatchableObjectByte(24) == 1;
}
public boolean is3D() {
return this.dataWatcher.getWatchableObjectByte(28) == 1 || isBlock();
}
public boolean sticksToWalls() {
return this.is3D() && this.dataWatcher.getWatchableObjectByte(30) == 1;
}
@@ -931,7 +930,7 @@ public class EntityProjectile extends EntityThrowable {
par1EntityPlayer.onItemPickup(this, 1);
this.setDead();
}
}
@Override
@@ -1,17 +1,17 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCDwarfFemale extends EntityNPCInterface
@@ -29,7 +29,7 @@ public class EntityNPCDwarfFemale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,17 +1,17 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCDwarfMale extends EntityNPCInterface
@@ -29,7 +29,7 @@ public class EntityNPCDwarfMale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,17 +1,17 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCElfFemale extends EntityNPCInterface
@@ -31,7 +31,7 @@ public class EntityNPCElfFemale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,17 +1,17 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCElfMale extends EntityNPCInterface
@@ -31,7 +31,7 @@ public class EntityNPCElfMale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,16 +1,16 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.controllers.data.SkinOverlay;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.data.ModelData;
public class EntityNPCEnderman extends EntityNpcEnderchibi
{
@@ -23,9 +23,9 @@ public class EntityNPCEnderman extends EntityNpcEnderchibi
this.width = 0.6F;
this.height = 2.9F;
}
public void updateHitbox() {
if(currentAnimation == EnumAnimation.LYING){
width = height = 0.2f;
}
@@ -40,22 +40,22 @@ public class EntityNPCEnderman extends EntityNpcEnderchibi
width = (width / 5f) * display.modelSize;
height = (height / 5f) * display.modelSize;
}
public void onUpdate()
{
isDead = true;
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
ModelData data = npc.modelData;
data.setEntityClass(EntityEnderman.class);
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
}
}
}
@@ -1,18 +1,18 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCFurryFemale extends EntityNPCInterface
@@ -29,7 +29,7 @@ public class EntityNPCFurryFemale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -46,8 +46,8 @@ public class EntityNPCFurryFemale extends EntityNPCInterface
snout.type = 1;
ModelPartData tail = data.getOrCreatePart("tail");
tail.playerTexture = true;
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
@@ -1,18 +1,18 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCFurryMale extends EntityNPCInterface
@@ -22,14 +22,14 @@ public class EntityNPCFurryMale extends EntityNPCInterface
super(world);
display.texture = "customnpcs:textures/entity/furrymale/WolfGrey.png";
}
public void onUpdate()
{
isDead = true;
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -41,8 +41,8 @@ public class EntityNPCFurryMale extends EntityNPCInterface
snout.type = 1;
ModelPartData tail = data.getOrCreatePart("tail");
tail.playerTexture = true;
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
@@ -1,17 +1,17 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCHumanFemale extends EntityNPCInterface
@@ -28,7 +28,7 @@ public class EntityNPCHumanFemale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,17 +1,17 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCOrcFemale extends EntityNPCInterface
@@ -28,7 +28,7 @@ public class EntityNPCOrcFemale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,17 +1,17 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCOrcMale extends EntityNPCInterface
@@ -29,7 +29,7 @@ public class EntityNPCOrcMale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,18 +1,18 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCVillager extends EntityNPCInterface
@@ -29,14 +29,14 @@ public class EntityNPCVillager extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
ModelData data = npc.modelData;
data.setEntityClass(EntityVillager.class);
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
@@ -1,18 +1,18 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNpcEnderchibi extends EntityNPCInterface
@@ -29,7 +29,7 @@ public class EntityNpcEnderchibi extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -38,7 +38,7 @@ public class EntityNpcEnderchibi extends EntityNPCInterface
data.modelScale.arms.setScale(0.50f,1.45f);
ModelPartData part = data.getOrCreatePart("particles");
part.playerTexture = true;
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
@@ -1,18 +1,18 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.constants.EnumAnimation;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNpcMonsterFemale extends EntityNPCInterface
@@ -29,7 +29,7 @@ public class EntityNpcMonsterFemale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -1,18 +1,18 @@
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst
// Decompiler options: packimports(3) braces deadcode fieldsfirst
package noppes.npcs.entity.old;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
import noppes.npcs.entity.EntityCustomNpc;
import noppes.npcs.entity.EntityNPCInterface;
import noppes.npcs.entity.data.ModelData;
import noppes.npcs.entity.data.ModelPartData;
// Referenced classes of package net.minecraft.src:
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNpcNagaFemale extends EntityNPCInterface
@@ -29,7 +29,7 @@ public class EntityNpcNagaFemale extends EntityNPCInterface
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
@@ -42,7 +42,7 @@ public class EntityNpcNagaFemale extends EntityNPCInterface
ModelPartData legs = data.legParts;
legs.playerTexture = true;
legs.type = 1;
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
Loaded 100 of 149 files, more files were not shown because too many files have changed in this diff. Show more