Jump to content

_Xandon_

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by _Xandon_

  1. So I have networked in unity before and it was an absolute failure so I said screw it I do not need this to be Multiplayer and made bots. Now I am trying to create a client side mod that will intercept player hit packets and based on those packets will send a packet to the server side that will be analyzed by a spigot plugin that I am also making. The problem is I have no clue what I am doing so any help would be greatly appreciated.

  2. Ok so I'm trying to port Mo'Bends Mod.

    Spoiler
    
    package net.gobbob.mobends;
    
    import java.io.File;
    import java.util.List;
    import net.gobbob.mobends.pack.BendsPack;
    import net.gobbob.mobends.settings.SettingsBoolean;
    import net.gobbob.mobends.settings.SettingsNode;
    import net.minecraftforge.common.config.Configuration;
    import net.minecraftforge.common.config.Property;
    import net.minecraftforge.fml.common.Mod;
    import net.minecraftforge.fml.common.Mod.EventHandler;
    import net.minecraftforge.fml.common.Mod.Instance;
    import net.minecraftforge.fml.common.SidedProxy;
    import net.minecraftforge.fml.common.event.FMLInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    
    @Mod(modid="mobends", version="1.8.9", acceptedMinecraftVersions="[1.8.9]")
    public class MoBends
    {
      public static final String MODID = "mobends";
      public static final String MODNAME = "Mo' Bends";
      public static final String VERSION = "0.21.3";
      @SidedProxy(serverSide="net.gobbob.mobends.CommonProxy", clientSide="net.gobbob.mobends.client.ClientProxy")
      public static CommonProxy proxy;
      @Mod.Instance("mobends")
      public static MoBends instance;
      public static File configFile;
      public static int refreshModel = 1;
      
      @Mod.EventHandler
      public void preinit(FMLPreInitializationEvent event)
      {
        configFile = event.getSuggestedConfigurationFile();
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());
        
        config.load();
        
        proxy.preinit(config);
        
        config.save();
      }
      
      public static void saveConfig()
      {
        Configuration config = new Configuration(configFile);
        
        config.load();
        for (int i = 0; i < AnimatedEntity.animatedEntities.size(); i++) {
          config.get("Animate", ((AnimatedEntity)AnimatedEntity.animatedEntities.get(i)).id, false).setValue(((AnimatedEntity)AnimatedEntity.animatedEntities.get(i)).animate);
        }
        config.get("General", "Sword Trail", true).setValue(((SettingsBoolean)SettingsNode.getSetting("swordTrail")).data);
        config.get("General", "Current Pack", true).setValue(BendsPack.currentPack);
        
        config.save();
      }
      
      @Mod.EventHandler
      public void init(FMLInitializationEvent event)
      {
        Configuration config = new Configuration(configFile);
        
        config.load();
        
        proxy.init(config);
        
        config.save();
      }
    }
    
    package net.gobbob.mobends.client;
    
    import net.gobbob.mobends.AnimatedEntity;
    import net.gobbob.mobends.CommonProxy;
    import net.gobbob.mobends.event.EventHandler_DataUpdate;
    import net.gobbob.mobends.event.EventHandler_Keyboard;
    import net.gobbob.mobends.event.EventHandler_RenderPlayer;
    import net.gobbob.mobends.pack.BendsPack;
    import net.gobbob.mobends.settings.SettingsBoolean;
    import net.gobbob.mobends.settings.SettingsNode;
    import net.minecraft.util.ResourceLocation;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.common.config.Configuration;
    import net.minecraftforge.common.config.Property;
    import net.minecraftforge.fml.client.registry.ClientRegistry;
    import net.minecraftforge.fml.common.FMLCommonHandler;
    import net.minecraftforge.fml.common.eventhandler.EventBus;
    
    public class ClientProxy
      extends CommonProxy
    {
      public static final ResourceLocation RES_ITEM_GLINT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
      public static final ResourceLocation texture_NULL = new ResourceLocation("mobends", "textures/white.png");
      public static final ResourceLocation GOBLIN_CAPE = new ResourceLocation("mobends", "textures/goblinCape.png");
      
      public void preinit(Configuration config)
      {
        BendsPack.preInit(config);
        
        ((SettingsBoolean)SettingsNode.getSetting("swordTrail")).data = config.get("General", "Sword Trail", true).getBoolean();
      }
      
      public void init(Configuration config)
      {
        AnimatedEntity.register(config);
        
        ClientRegistry.registerKeyBinding(EventHandler_Keyboard.key_Menu);
        
        MinecraftForge.EVENT_BUS.register(new EventHandler_DataUpdate());
        MinecraftForge.EVENT_BUS.register(new EventHandler_RenderPlayer());
        MinecraftForge.EVENT_BUS.register(new EventHandler_DataUpdate());
        MinecraftForge.EVENT_BUS.register(new EventHandler_Keyboard());
        MinecraftForge.EVENT_BUS.register(new EventHandler_RenderPlayer());
      }
    }
    
    package net.gobbob.mobends.client.renderer.entity;
    
    import net.gobbob.mobends.client.model.entity.ModelBendsPlayer;
    import net.gobbob.mobends.client.renderer.entity.layers.LayerBendsCape;
    import net.gobbob.mobends.client.renderer.entity.layers.LayerBendsCustomHead;
    import net.gobbob.mobends.client.renderer.entity.layers.LayerBendsPlayerArmor;
    import net.gobbob.mobends.data.Data_Player;
    import net.gobbob.mobends.settings.SettingsBoolean;
    import net.gobbob.mobends.settings.SettingsNode;
    import net.minecraft.client.entity.AbstractClientPlayer;
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.client.model.ModelPlayer;
    import net.minecraft.client.renderer.GlStateManager;
    import net.minecraft.client.renderer.entity.RenderManager;
    import net.minecraft.client.renderer.entity.RenderPlayer;
    import net.minecraft.client.renderer.entity.layers.LayerArrow;
    import net.minecraft.client.renderer.entity.layers.LayerDeadmau5Head;
    import net.minecraft.client.renderer.entity.layers.LayerHeldItem;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.player.EnumPlayerModelParts;
    import net.minecraft.item.EnumAction;
    import net.minecraft.item.ItemStack;
    import net.minecraft.scoreboard.Score;
    import net.minecraft.scoreboard.ScoreObjective;
    import net.minecraft.scoreboard.Scoreboard;
    import net.minecraft.util.ResourceLocation;
    
    import org.lwjgl.opengl.GL11;
    
    public class RenderBendsPlayer extends RenderPlayer{
        private boolean smallArms;
        
        public RenderBendsPlayer(RenderManager renderManager)
        {
            super(renderManager, false);
            this.smallArms = false;
            this.mainModel = new ModelBendsPlayer(0.0F, false);
            this.layerRenderers.clear();
            this.addLayer(new LayerBendsPlayerArmor(this));
            this.addLayer(new LayerHeldItem(this));
            this.addLayer(new LayerArrow(this));
            this.addLayer(new LayerDeadmau5Head(this));
            this.addLayer(new LayerBendsCape(this));
            this.addLayer(new LayerBendsCustomHead((ModelBendsPlayer) this.getMainModel()));
        }
    
        public RenderBendsPlayer(RenderManager renderManager, boolean useSmallArms)
        {
        	super(renderManager, useSmallArms);
        	this.smallArms = useSmallArms;
        	this.mainModel = new ModelBendsPlayer(0.0F, useSmallArms);
        	this.layerRenderers.clear();
        	this.addLayer(new LayerBendsPlayerArmor(this));
            this.addLayer(new LayerHeldItem(this));
            this.addLayer(new LayerArrow(this));
            this.addLayer(new LayerDeadmau5Head(this));
            this.addLayer(new LayerBendsCape(this));
            this.addLayer(new LayerBendsCustomHead((ModelBendsPlayer) this.getMainModel()));
        }
        
        @Override
        public ModelPlayer getMainModel()
        {
        	if(!(this.mainModel instanceof ModelBendsPlayer)){
        		this.mainModel = new ModelBendsPlayer(0.0F, this.smallArms);
        	}
        	return (ModelBendsPlayer)this.mainModel;
        }
        
        @Override
        protected void rotateCorpse(AbstractClientPlayer p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_)
        {
    	    super.rotateCorpse(p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
        }
        
        private void setModelVisibilities(AbstractClientPlayer visibility)
        {
        	ModelBendsPlayer modelplayer = (ModelBendsPlayer) this.getMainModel();
    
            if (visibility.isSpectator())
            {
                modelplayer.setInvisible(false);
                modelplayer.bipedHead.showModel = true;
                modelplayer.bipedHeadwear.showModel = true;
            }
            else
            {
                ItemStack itemstack = visibility.inventory.getCurrentItem();
                modelplayer.setInvisible(true);
                modelplayer.bipedHeadwear.showModel = visibility.isWearing(EnumPlayerModelParts.HAT);
                modelplayer.bipedBodyWear.showModel = visibility.isWearing(EnumPlayerModelParts.JACKET);
                modelplayer.bipedLeftLegwear.showModel = visibility.isWearing(EnumPlayerModelParts.LEFT_PANTS_LEG);
                modelplayer.bipedRightLegwear.showModel = visibility.isWearing(EnumPlayerModelParts.RIGHT_PANTS_LEG);
                modelplayer.bipedLeftArmwear.showModel = visibility.isWearing(EnumPlayerModelParts.LEFT_SLEEVE);
                modelplayer.bipedRightArmwear.showModel = visibility.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
                modelplayer.heldItemLeft = 0;
                modelplayer.aimedBow = false;
                modelplayer.isSneak = visibility.isSneaking();
    
                if (itemstack == null)
                {
                    modelplayer.heldItemRight = 0;
                }
                else
                {
                    modelplayer.heldItemRight = 1;
    
                    if (visibility.getItemInUseCount() > 0)
                    {
                        EnumAction enumaction = itemstack.getItemUseAction();
    
                        if (enumaction == EnumAction.BLOCK)
                        {
                            modelplayer.heldItemRight = 3;
                        }
                        else if (enumaction == EnumAction.BOW)
                        {
                            modelplayer.aimedBow = true;
                        }
                    }
                }
            }
        }
        
        @Override
        protected ResourceLocation getEntityTexture(AbstractClientPlayer entity)
        {
            return entity.getLocationSkin();
        }
    
        public void func_82422_c()
        {
            GlStateManager.translate(0.0F, 0.1875F, 0.0F);
        }
    
        /**
         * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
         * entityLiving, partialTickTime
         */
        @Override
        protected void preRenderCallback(AbstractClientPlayer p_77041_1_, float p_77041_2_)
        {
            float f1 = 0.9375F;
            GlStateManager.scale(f1, f1, f1);
            
            ((ModelBendsPlayer)this.getMainModel()).updateWithEntityData(p_77041_1_);
            ((ModelBendsPlayer)this.mainModel).postRenderTranslate(0.0625f);
        
            Data_Player data = Data_Player.get(p_77041_1_.getEntityId());
        
            if(((SettingsBoolean)SettingsNode.getSetting("swordTrail")).data){
    			GL11.glPushMatrix();
    				float f5 = 0.0625F;
    				GL11.glScalef(-f5, -f5, f5);
    				data.swordTrail.render((ModelBendsPlayer)this.getMainModel());
    				GL11.glColor4f(1,1,1,1);
    			GL11.glPopMatrix();
            }
            
            ((ModelBendsPlayer)this.getMainModel()).postRenderRotate(0.0625f);
        }
        
        @Override
        public void renderRightArm(AbstractClientPlayer clientPlayer)
        {
            float f = 1.0F;
            GlStateManager.color(f, f, f);
            ModelPlayer modelplayer = this.getMainModel();
            this.setModelVisibilities(clientPlayer);
            modelplayer.swingProgress = 0.0F;
            modelplayer.isSneak = false;
            modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
            modelplayer.renderRightArm();
        }
        
        @Override
        public void renderLeftArm(AbstractClientPlayer clientPlayer)
        {
            float f = 1.0F;
            GlStateManager.color(f, f, f);
            ModelPlayer modelplayer = this.getMainModel();
            this.setModelVisibilities(clientPlayer);
            modelplayer.isSneak = false;
            modelplayer.swingProgress = 0.0F;
            modelplayer.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, clientPlayer);
            modelplayer.renderLeftArm();
        }
    
        /**
         * Sets a simple glTranslate on a LivingEntity.
         */
        protected void renderLivingAt(AbstractClientPlayer p_77039_1_, double p_77039_2_, double p_77039_4_, double p_77039_6_)
        {
        	super.renderLivingAt(p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_);
        }
    
        /**
         * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
         * entityLiving, partialTickTime
         */
    
        /**
         * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
         * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
         * (Render<T extends Entity>) and this method has signature public void func_76986_a(T entity, double d, double d1,
         * double d2, float f, float f1). But JAD is pre 1.5 so doe
         */
    }
    
    package net.gobbob.mobends.animation.player;
    
    import net.gobbob.mobends.animation.Animation;
    import net.gobbob.mobends.client.model.ModelRendererBends;
    import net.gobbob.mobends.client.model.entity.ModelBendsPlayer;
    import net.gobbob.mobends.data.EntityData;
    import net.gobbob.mobends.util.GUtil;
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.util.MathHelper;
    
    public class Animation_Walk extends Animation{
    	public String getName(){
    		return "walk";
    	}
    
    	@Override
    	public void animate(EntityLivingBase argEntity, ModelBase argModel, EntityData argData) {
    		ModelBendsPlayer model = (ModelBendsPlayer) argModel;
    		
    		((ModelRendererBends)model.bipedRightArm).rotation.setSmoothX(0.5f*(float) ((MathHelper.cos(model.armSwing * 0.6662F + (float)Math.PI) * 2.0F * model.armSwingAmount * 0.5F ) / Math.PI * 180.0f));
    		((ModelRendererBends)model.bipedLeftArm).rotation.setSmoothX(0.5f*(float) ((MathHelper.cos(model.armSwing * 0.6662F) * 2.0F * model.armSwingAmount * 0.5F) / Math.PI * 180.0f));
    		
    		((ModelRendererBends)model.bipedRightArm).rotation.setSmoothZ(5,0.3f);
    		((ModelRendererBends)model.bipedLeftArm).rotation.setSmoothZ(-5,0.3f);
    		
    		((ModelRendererBends)model.bipedRightLeg).rotation.setSmoothX(-5.0f+0.5f*(float) ((MathHelper.cos(model.armSwing * 0.6662F) * 1.4F * model.armSwingAmount) / Math.PI * 180.0f),1.0f);
    		((ModelRendererBends)model.bipedLeftLeg).rotation.setSmoothX(-5.0f+0.5f*(float) ((MathHelper.cos(model.armSwing * 0.6662F + (float)Math.PI) * 1.4F * model.armSwingAmount) / Math.PI * 180.0f),1.0f);
    		
    		((ModelRendererBends)model.bipedRightLeg).rotation.setSmoothY(0.0f);
    		((ModelRendererBends)model.bipedLeftLeg).rotation.setSmoothY(0.0f);
    		
    		((ModelRendererBends)model.bipedRightLeg).rotation.setSmoothZ(2,0.2f);
    		((ModelRendererBends)model.bipedLeftLeg).rotation.setSmoothZ(-2,0.2f);
    		
    		float var = (float) ((float) (model.armSwing * 0.6662F)/Math.PI)%2;
    		((ModelRendererBends)model.bipedLeftForeLeg).rotation.setSmoothX( (var > 1 ? 45 : 0), 0.3f);
    		((ModelRendererBends)model.bipedRightForeLeg).rotation.setSmoothX( (var > 1 ? 0 : 45), 0.3f);
    		((ModelRendererBends)model.bipedLeftForeArm).rotation.setSmoothX( ((float) (Math.cos(model.armSwing * 0.6662F + Math.PI/2)+1.0f)/2.0f)*-20, 1.0f);
    		((ModelRendererBends)model.bipedRightForeArm).rotation.setSmoothX( ((float) (Math.cos(model.armSwing * 0.6662F)+1.0f)/2.0f)*-20, 0.3f);
    		
    		float var2 = (float)Math.cos(model.armSwing * 0.6662F)*-20;
    		float var3 = (float)(Math.cos(model.armSwing * 0.6662F * 2.0f)*0.5f+0.5f)*10-2;
    		((ModelRendererBends)model.bipedBody).rotation.setSmoothY(var2,0.5f);
    		((ModelRendererBends)model.bipedBody).rotation.setSmoothX(var3);
    		((ModelRendererBends)model.bipedHead).rotation.setSmoothY(model.headRotationY - var2,0.5f);
    		((ModelRendererBends)model.bipedHead).rotation.setSmoothX(model.headRotationX - var3);
    		
    		float var10 = model.headRotationY*0.1f;
    		var10 = GUtil.max(var10,10);
    		var10 = GUtil.min(var10,-10);
    		((ModelRendererBends)model.bipedBody).rotation.setSmoothZ(-var10, 0.3f);
    	}
    }
    
    package net.gobbob.mobends;
    
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
    
    import com.google.common.collect.Maps;
    
    import net.gobbob.mobends.animation.Animation;
    import net.gobbob.mobends.client.renderer.entity.RenderBendsPlayer;
    import net.gobbob.mobends.client.renderer.entity.RenderBendsSpider;
    import net.gobbob.mobends.client.renderer.entity.RenderBendsZombie;
    import net.gobbob.mobends.util.BendsLogger;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.entity.AbstractClientPlayer;
    import net.minecraft.client.renderer.entity.Render;
    import net.minecraft.client.renderer.entity.RenderPlayer;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.monster.EntitySpider;
    import net.minecraft.entity.monster.EntityZombie;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraftforge.common.config.Configuration;
    import net.minecraftforge.fml.client.registry.RenderingRegistry;
    
    public class AnimatedEntity {
    	public static List<AnimatedEntity> animatedEntities = new ArrayList<AnimatedEntity>();
    	
    	public static Map skinMap = Maps.newHashMap();
        public static RenderBendsPlayer playerRenderer;
    	
    	public String id;
    	public String displayName;
    	public Entity entity;
    	
    	public Class<? extends Entity> entityClass;
    	public Render renderer;
    	
    	public List<Animation> animations = new ArrayList<Animation>();
    	
    	public boolean animate = true;
    	
    	public AnimatedEntity(String argID, String argDisplayName, Entity argEntity, Class<? extends Entity> argClass, Render argRenderer){
    		this.id = argID;
    		this.displayName = argDisplayName;
    		this.entityClass = argClass;
    		this.renderer = argRenderer;
    		this.entity = argEntity;
    		this.animate = true;
    	}
    	
    	public AnimatedEntity add(Animation argGroup){
    		this.animations.add(argGroup);
    		return this;
    	}
    	
    	public static void register(Configuration config){
    		BendsLogger.log("Registering Animated Entities...", BendsLogger.INFO);
    		
    		animatedEntities.clear();
    		
    		registerEntity(new AnimatedEntity("player","Player",Minecraft.getMinecraft().thePlayer,EntityPlayer.class,new RenderBendsPlayer(Minecraft.getMinecraft().getRenderManager())).
    			add(new net.gobbob.mobends.animation.player.Animation_Stand()).
    			add(new net.gobbob.mobends.animation.player.Animation_Walk()).
    			add(new net.gobbob.mobends.animation.player.Animation_Sneak()).
    			add(new net.gobbob.mobends.animation.player.Animation_Sprint()).
    			add(new net.gobbob.mobends.animation.player.Animation_Jump()).
    			add(new net.gobbob.mobends.animation.player.Animation_Attack()).
    			add(new net.gobbob.mobends.animation.player.Animation_Swimming()).
    			add(new net.gobbob.mobends.animation.player.Animation_Bow()).
    			add(new net.gobbob.mobends.animation.player.Animation_Riding()).
    			add(new net.gobbob.mobends.animation.player.Animation_Mining()).
    			add(new net.gobbob.mobends.animation.player.Animation_Axe()));
    		registerEntity(new AnimatedEntity("zombie","Zombie",new EntityZombie(null),EntityZombie.class,new RenderBendsZombie(Minecraft.getMinecraft().getRenderManager())).
    			add(new net.gobbob.mobends.animation.zombie.Animation_Stand()).
    			add(new net.gobbob.mobends.animation.zombie.Animation_Walk()));
    		registerEntity(new AnimatedEntity("spider","Spider",new EntitySpider(null),EntitySpider.class,new RenderBendsSpider(Minecraft.getMinecraft().getRenderManager())).
    			add(new net.gobbob.mobends.animation.spider.Animation_OnGround()).
    			add(new net.gobbob.mobends.animation.spider.Animation_Jump()).
    			add(new net.gobbob.mobends.animation.spider.Animation_WallClimb()));
    		
    		for(int i = 0;i < AnimatedEntity.animatedEntities.size();i++){
    			AnimatedEntity.animatedEntities.get(i).animate = config.get("Animate", AnimatedEntity.animatedEntities.get(i).id, true).getBoolean();
            }
    		
    		for(int i = 0;i < animatedEntities.size();i++){
    			if(animatedEntities.get(i).animate) RenderingRegistry.registerEntityRenderingHandler(animatedEntities.get(i).entityClass, animatedEntities.get(i).renderer);
    		}
    		
    		playerRenderer = new RenderBendsPlayer(Minecraft.getMinecraft().getRenderManager());
    		skinMap.put("default", playerRenderer);
    		skinMap.put("slim", new RenderBendsPlayer(Minecraft.getMinecraft().getRenderManager(), true));
    	}
    	
    	public static void registerEntity(AnimatedEntity argEntity){
    		BendsLogger.log("Registering " + argEntity.displayName, BendsLogger.INFO);
    		animatedEntities.add(argEntity);
    	}
    	
    	public Animation get(String argName){
    		for(int i = 0;i < animations.size();i++){
    			if(animations.get(i).getName().equalsIgnoreCase(argName)){
    				return animations.get(i);
    			}
    		}
    		return null;
    	}
    	
    	public static AnimatedEntity getByEntity(Entity argEntity){
    		for(int i = 0;i < animatedEntities.size();i++){
    			if(animatedEntities.get(i).entityClass.isInstance(argEntity)){
    				return animatedEntities.get(i);
    			}
    		}
    		return null;
    	}
    
    	public static RenderBendsPlayer getPlayerRenderer(AbstractClientPlayer player) {
    		String s = ((AbstractClientPlayer)player).getSkinType();
    		RenderBendsPlayer renderplayer = (RenderBendsPlayer)skinMap.get(s);
            return renderplayer != null ? renderplayer : playerRenderer;
    	}
    }

     

     

  3. So I'm trying to make a mod that will display info from game updates on your screen e.g. (player.getAIMoveSpeed() ) so then i  want to take that info and display it on the screen of the player. I have no clue how to render text on screen would it be some sort of GUI that's always open?

     

    Thanks

     

     

    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    ##################################
    

     

  4. I cant Get it to work I don't know why but its at my tile-entity registry

    here is my crash report

     

    ---- Minecraft Crash Report ----
    // Oops.

    Time: 3/3/18 6:29 PM
    Description: Initializing game

    java.lang.NullPointerException: Initializing game
        at _Xandon_.alienmod.alienmod.init(alienmod.java:144)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
        at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
        at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
        at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
        at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
        at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
        at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)
        at net.minecraft.client.Minecraft.run(Minecraft.java:942)
        at net.minecraft.client.main.Main.main(Main.java:164)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
        at GradleStart.main(Unknown Source)


    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------

    -- Head --
    Stacktrace:
        at _Xandon_.alienmod.alienmod.init(alienmod.java:144)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
        at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
        at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
        at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
        at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
        at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
        at com.google.common.eventbus.EventBus.post(EventBus.java:275)
        at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
        at cpw.mods.fml.common.Loader.initializeMods(Loader.java:737)
        at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:311)
        at net.minecraft.client.Minecraft.startGame(Minecraft.java:597)

    -- Initialization --
    Details:
    Stacktrace:
        at net.minecraft.client.Minecraft.run(Minecraft.java:942)
        at net.minecraft.client.main.Main.main(Main.java:164)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
        at GradleStart.main(Unknown Source)

    -- System Details --
    Details:
        Minecraft Version: 1.7.10
        Operating System: Windows 10 (amd64) version 10.0
        Java Version: 1.8.0_161, Oracle Corporation
        Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
        Memory: 666910392 bytes (636 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
        JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
        AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
        IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
        FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
        States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
        UCHI    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
        UCHI    FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
        UCHI    Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)
        UCHE    am{1.7.0} [_Xandon_'s Alien Mod] (bin)
        GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 10.18.15.4248' Renderer: 'Intel(R) HD Graphics 4600'
        Launched Version: 1.7.10
        LWJGL: 2.9.1
        OpenGL: Intel(R) HD Graphics 4600 GL version 4.3.0 - Build 10.18.15.4248, Intel
        GL Caps: Using GL 1.3 multitexturing.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Anisotropic filtering is supported and maximum anisotropy is 16.
    Shaders are available because OpenGL 2.1 is supported.

        Is Modded: Definitely; Client brand changed to 'fml,forge'
        Type: Client (map_client.txt)
        Resource Packs: []
        Current Language: English (US)
        Profiler Position: N/A (disabled)
        Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
        Anisotropic Filtering: Off (1)

     

    and heres the problematic code: GameRegistry.registerTileEntity(TileEntityblockFutureStorage.class, blockFutureStorage.getLocalizedName());
                ClientRegistry.bindTileEntitySpecialRenderer(TileEntityblockFutureStorage.class, new RenderTileEntityblockFutureStorage());

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.