Jump to content

blfngl

Members
  • Posts

    87
  • Joined

  • Last visited

Posts posted by blfngl

  1. Exactly the title. I've got this projectile (EntityThrowable extension) that's not registering collisions at point-blank range, but if the player fires it approximately 5-6 blocks away hits register perfectly fine.

     

    Projectile:

    Spoiler
    
    public class EntityBullet extends EntityThrowable
    {
    	private float damage;
    
    	public EntityBullet(World worldIn)
    	{
    		super(worldIn);
    	}
    
    	public EntityBullet(World worldIn, EntityLivingBase throwerIn, float damage)
    	{
    		super(worldIn, throwerIn);
    		this.damage = damage;
    	}
    
    	public EntityBullet(World worldIn, double x, double y, double z)
    	{
    		super(worldIn, x, y, z);
    	}
    
    
    	// Spawns impact particles
    	@SideOnly(Side.CLIENT)
    	public void handleStatusUpdate(byte id)
    	{
    		if (id == 3)
    			for (int i = 0; i < 8; ++i)
    				this.world.spawnParticle(EnumParticleTypes.CRIT, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
    
    	}
    
    	/**
    	 * Called when this EntityThrowable hits a block or entity.
    	 */
    	@Override
    	protected void onImpact(RayTraceResult result)
    	{
    		if (result.entityHit != null)
    			result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), damage);
    
    		if (!this.world.isRemote)
    		{
    			// Make it so that particles will spawn on impact
    			this.world.setEntityState(this, (byte) 3);
    			this.setDead();
    		}
    	}
    
    	@Override
    	protected float getGravityVelocity()
    	{
    		return 0.0f;
    	}
    }

     

     

    Registry:

    Spoiler
    
    EntityRegistry.registerModEntity(new ResourceLocation(Reference.MODID + ":textures/entity/projectile/bullet.png"),
    			EntityBullet.class, "entityBullet", id++, Fallout.instance, 64, 1, false);

     

     

    Any ideas how to fix this?

  2. 2 hours ago, diesieben07 said:

    Capabilities have nothing to do with this. The client cannot directly make changes like this. You have to send a packet to the server and inform them that the button has been clicked. Then confirm that the action may actually performed (e.g. make sure the player is not spamming the packet) and then perform the necessary manipulations.

    Thanks for the help. Figured it out!

  3. Hi there, I'm using a non-container gui to handle some inventory manipulation. A button can be clicked and items from a player's inventory should be consumed:

     

    Spoiler
    
    	@Override
    	protected void actionPerformed(GuiButton button) throws IOException
    	{
    		if (button.equals(buttonCraft))
    		{
    			if (player.inventory.hasItemStack(new ItemStack(Items.APPLE)))
    			{
    				int index = player.inventory.findSlotMatchingUnusedItem(new ItemStack(Items.APPLE));
    				player.inventory.decrStackSize(index, 1);
    				player.inventory.markDirty();
    			}
    		}
    	}

     

     

    The change is marked in the inventory until I exit and then reenter the world. Am I supposed to be using Capabilities to handle this? Thanks!

  4. Just as the title states, I'm having trouble opening a container-less gui. It's just a button with a background as of now. I'm unsure if I'm handling it correctly, so any insight would be appreciated.

     

    So, what's happening is that the gui itself is opening perfectly fine, the button and background are drawing and the button functions, the console prints my message, but my background png (simply the demobackground.png provided by Minecraft) isn't drawing. There isn't an error message when opening the gui as well.

     

    I think this is all the relevant code and I've attached an image of what the gui is displaying. If you need anything else from me please let me know, thanks!

     

    Gui:

    Spoiler
    
    public class GuiWorkshop extends GuiScreen
    {
    	private static final ResourceLocation BACKGROUND = new ResourceLocation(Reference.MODID + ":textures/gui/gui_workshop.png");
    	private GuiButton buttonCraft;
    	private int buttonId = 0;
    
    	public GuiWorkshop()
    	{
    
    	}
    
    	@Override
    	public void initGui()
    	{
    		buttonList.clear();
    		Keyboard.enableRepeatEvents(true);
    
    		buttonCraft = new GuiButton(buttonId++, width / 2 - 25, height / 2, 50, 20, "text");
    		buttonList.add(buttonCraft);
    	}
    
    	@Override
    	public void updateScreen()
    	{
    		super.updateScreen();
    	}
    
    	@Override
    	public void drawScreen(int mouseX, int mouseY, float partialTicks)
    	{
    		this.drawDefaultBackground();
    		mc.getTextureManager().bindTexture(BACKGROUND);
    		super.drawScreen(mouseX, mouseY, partialTicks);
    	}
    
    	@Override
    	protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick)
    	{
    
    	}
    
    	@Override
    	protected void actionPerformed(GuiButton button)
    	{
    		if (button.equals(buttonCraft))
    			System.out.println("do something");
    	}
    
    	@Override
    	public void onGuiClosed()
    	{
    
    	}
    
    	@Override
    	public boolean doesGuiPauseGame()
    	{
    		return false;
    	}
    }

     

     

    GuiHandler:

    Spoiler
    
    /**
     * This is for connecting a gui with its container
     * @author blfngl
     */
    public class GuiHandler implements IGuiHandler
    {
    	@Override
    	public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
    	{
    		switch (id)
    		{
    		case Reference.GUI_WORKSHOP_ID:
    			return new GuiWorkshop();
    		}
    
    		return null;
    	}
    
    	@Override
    	public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
    	{
    		switch (id)
    		{
    
    		}
    		return null;
    	}
    }

     

    Block:

    Spoiler
    
    public class BlockWorkshop extends BlockFallout
    {
    	private static String name = "workshop";
    	private static Material material = Material.ROCK;
    
    	public BlockWorkshop()
    	{
    		super(material, name);
    	}
    
    	@Override
    	public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
    	{
    		player.openGui(Fallout.instance, Reference.GUI_WORKSHOP_ID, world, pos.getX(), pos.getY(), pos.getZ());
    		return true;
    	}
    }

     

     

    Main:

    Spoiler
    
    @EventHandler
    	public void preInit(FMLPreInitializationEvent event)
    	{
    		System.out.println("Blfngl's Fallout Mod loading...");
    		logger = event.getModLog();
    		proxy.preInit(event);
    		proxy.registerGui();
    		proxy.registerRenders();
    	}

     

     

    ClientProxy:

    Spoiler
    
    public class ClientProxy extends CommonProxy
    {
    	@Override
    	public void registerItemRenderer(Item item, int meta, String id)
    	{
    		ModelLoader.setCustomModelResourceLocation(item, meta,
    				new ModelResourceLocation(Reference.MODID + ":" + id, "inventory"));
    	}
    
    	@Override
    	public void registerRenders()
    	{
    		FalloutEntities.initModels();
    	}
    
    	@Override
    	public void registerGui()
    	{
    		NetworkRegistry.INSTANCE.registerGuiHandler(Fallout.instance, new GuiHandler());
    	}
    }

     

    gui.png

  5. Haven't checked in with Forge in a long time and I see there's been a lot of changes. Was attempting to update one of my old mods, and I'm needing to render a projectile, but (obviously) the way I used to do it doesn't work anymore. I'm trying this:

     

    Spoiler
    
    package blfngl.fallout.util;
    
    import blfngl.fallout.Fallout;
    import blfngl.fallout.entity.EntityBullet;
    import net.minecraft.block.Block;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.block.model.ModelResourceLocation;
    import net.minecraft.client.renderer.entity.RenderManager;
    import net.minecraft.client.renderer.entity.RenderSnowball;
    import net.minecraft.client.renderer.texture.TextureManager;
    import net.minecraft.client.resources.IResourceManager;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemBlock;
    import net.minecraftforge.client.model.ModelLoader;
    import net.minecraftforge.event.RegistryEvent.Register;
    import net.minecraftforge.fml.client.registry.RenderingRegistry;
    import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.common.registry.EntityEntry;
    
    @EventBusSubscriber
    public class RegistryHandler
    {
    	@SubscribeEvent
    	public static void registerBlocks(Register<Block> event)
    	{
    		for (Block block: Fallout.blockList)
    			event.getRegistry().register(block);
    	}
    
    	@SubscribeEvent
    	public static void registerItemBlocks(Register<Item> register)
    	{
    		for (Block block: Fallout.itemBlockList)
    		{
    			ItemBlock iBlock = new ItemBlock(block);
    			iBlock.setRegistryName(block.getRegistryName());
    			register.getRegistry().register(iBlock);
    		}
    	}
    
    	@SubscribeEvent
    	public static void registerItems(Register<Item> register)
    	{
    		for (Item item: Fallout.itemList)
    		{
    			register.getRegistry().register(item);
    			ModelResourceLocation modelLoc = new ModelResourceLocation(item.getRegistryName(), "inventory");
    			ModelLoader.setCustomModelResourceLocation(item, 0, modelLoc);
    		}
    	}
    
    	@SubscribeEvent
    	public static void renderModels(Register<EntityEntry> register)
    	{
    		int entityId = 0;
    
    		EntityEntry bullet = new EntityEntry(EntityBullet.class, "fallout_bullet")
    				.setRegistryName(Reference.MODID, "fallout_bullet");
    		register.getRegistry().register(bullet);
    
    		RenderManager renderBullet = new RenderManager(null, Minecraft.getMinecraft().getRenderItem());
    		RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class,
    				new RenderSnowball(renderBullet, FalloutItems.ammoSpike, Minecraft.getMinecraft().getRenderItem()));
    	}
    }

     

    but I'm not getting anything rendered. The entity is there and affects the world, but isn't visible. Any ideas?

  6. Kay, looks like this now:

    public void onUpdate(ItemStack itemstack, World world, Entity entity, int metadata, boolean bool)
    {
    	if (!world.isRemote)
    	{
    		if (itemstack.getTagCompound() == null)
    		{
    			itemstack.setTagCompound(new NBTTagCompound());
    			itemstack.getTagCompound().setInteger("clipCount", 0);
    			itemstack.getTagCompound().setInteger("currentReloadTime", 0);
    			itemstack.getTagCompound().setInteger("currentShotTime", 0);
    			System.out.println("onUpdate tag created");
    		}
    
    		if (itemstack.getTagCompound() != null)
    		{
    			NBTTagCompound tag = itemstack.getTagCompound();
    
    			tag.setInteger("currentShotTime", tag.getInteger("currentShotTime") + 1);
    			tag.setInteger("currentReloadTime", tag.getInteger("currentReloadTime") + 1);
    
    			if (entity instanceof EntityPlayer)
    			{
    				EntityPlayer player = (EntityPlayer) entity;
    				FalloutPlayer props = FalloutPlayer.get(player);
    
    				if (tag.getInteger("clipcount") < clipSize && props.getReloadingState() == 1 && player.inventory.hasItem(ammoType))
    				{
    					player.playSound(reloadSound, 1.0F, 1);
    
    					for (int i = 0; i < clipSize; i++)
    					{
    						if (player.inventory.hasItem(ammoType) && tag.getInteger("clipcount") < clipSize)
    						{
    							player.inventory.consumeInventoryItem(ammoType);
    							player.inventory.markDirty();
    							//player.inventoryContainer.detectAndSendChanges();
    
    							int currentClip = tag.getInteger("clipcount");
    							tag.setInteger("clipCount", currentClip + 1);
    						}
    					}
    
    					tag.setInteger("currentReloadTime", 0);
    					props.setReloadingState(0);
    				}
    			}
    		}
    	}
    }

     

     

    Now nothing at all happens. There's a keybind I'm using that tells an IExtendedEntityProperties class that a player is reloading and sets a certain integer mark that. After the player is done reloading, it sets the int back to 0, but I think it's all on the client side. Would that be the reason this isn't communicating? I inserted println checks and it wont stop printing after it reached the IExtendedEntityProperties check.

  7. Switched it to this:

    public void onUpdate(ItemStack itemstack, World world, Entity entity, int metadata, boolean bool)
    {
    	if (itemstack.getTagCompound() == null)
    	{
    		itemstack.setTagCompound(new NBTTagCompound());
    		itemstack.getTagCompound().setInteger("clipCount", 0);
    		itemstack.getTagCompound().setInteger("currentReloadTime", 0);
    		itemstack.getTagCompound().setInteger("currentShotTime", 0);
    		System.out.println("onUpdate tag created");
    	}
    
    	if (itemstack.getTagCompound() != null)
    	{
    		NBTTagCompound tag = itemstack.getTagCompound();
    
    		tag.setInteger("currentShotTime", tag.getInteger("currentShotTime") + 1);
    		tag.setInteger("currentReloadTime", tag.getInteger("currentReloadTime") + 1);
    
    		if (entity instanceof EntityPlayer)
    		{
    			EntityPlayer player = (EntityPlayer) entity;
    			FalloutPlayer props = FalloutPlayer.get(player);
    
    			if (tag.getInteger("clipcount") < clipSize && props.getReloadingState() == 1 && player.inventory.hasItem(ammoType))
    			{
    				player.playSound(reloadSound, 1.0F, 1);
    
    				for (int i = 0; i < clipSize; i++)
    				{
    					if (player.inventory.hasItem(ammoType) && tag.getInteger("clipcount") < clipSize)
    					{
    						if (!world.isRemote)
    						{
    							player.inventory.consumeInventoryItem(ammoType);
    							player.inventory.markDirty();
    							//player.inventoryContainer.detectAndSendChanges();
    
    							int currentClip = tag.getInteger("clipcount");
    							tag.setInteger("clipCount", currentClip + 1);
    						}
    					}
    				}
    
    				tag.setInteger("currentReloadTime", 0);
    				props.setReloadingState(0);
    			}
    		}
    	}
    }

     

     

    When I don't have the worldRemote check the ammo is consumed (and stays consumed), but the tag is not updated. If the check is there all it does is play the sound.

  8. That's what I had in the last block and is what I'm currently using:

    if (!world.isRemote)
    						{
    							player.inventory.consumeInventoryItem(ammoType);
    							player.inventory.markDirty();
    							player.inventoryContainer.detectAndSendChanges();
    							clipCount++;
    							//int currentClip = itemstack.getTagCompound().getInteger("clipCount");
    							//itemstack.getTagCompound().setInteger("clipCount", currentClip + 1);
    						}

     

    This is the final check, but it still won't update. As shown above, a sound plays and then the bullets will load into the weapon. On screen it shows the current clip count out of clip size, ie 4/6 loaded, and this number is never updated as well.

  9. Yeah, I'm aware that values like that are applied on a global scale. I've been using NBT tags in other versions, but they don't always seem to work, so while I'm figuring that out I'm using item values.

    On another note, in the past I've used !world.isRemote checks, but the method doesn't fire. Here's an example of what I used to have:

    public void onUpdate(ItemStack itemstack, World world, Entity entity, int metadata, boolean bool)
    {
    	if (itemstack.getTagCompound() == null)
    	{
    		itemstack.setTagCompound(new NBTTagCompound()); // = new NBTTagCompound();
    		itemstack.getTagCompound().setInteger("clipCount", 0);
    		itemstack.getTagCompound().setInteger("currentReloadTime", 0);
    		itemstack.getTagCompound().setInteger("currentShotTime", 0);
    	}
    
    	if (itemstack.getTagCompound() != null)
    	{
    		//itemstack.getTagCompound().setInteger("currentShotTime", itemstack.getTagCompound().getInteger("currentShotTime") + 1);
    		//itemstack.getTagCompound().setInteger("currentReloadTime", itemstack.getTagCompound().getInteger("currentReloadTime") + 1);
    
    		currentShot++;
    		currentReload++;
    
    		if (entity instanceof EntityPlayer)
    		{
    			EntityPlayer player = (EntityPlayer) entity;
    			FalloutPlayer props = FalloutPlayer.get(player);
    
    			//if (clipCount < clipSize && Fallout.isReloading && player.inventory.hasItem(ammoType))
    			if (clipCount < clipSize && props.getReloadingState() == 1 && player.inventory.hasItem(ammoType))
    			{
    				player.playSound(reloadSound, 1.0F, 1);
    
    				for (int i = 0; i < clipSize; i++)
    				{
    					if (player.inventory.hasItem(ammoType) && clipCount < clipSize)
    					{
    						if (!world.isRemote)
    						{
    							player.inventory.consumeInventoryItem(ammoType);
    							player.inventory.markDirty();
    							player.inventoryContainer.detectAndSendChanges();
    							clipCount++;
    							//int currentClip = itemstack.getTagCompound().getInteger("clipCount");
    							//itemstack.getTagCompound().setInteger("clipCount", currentClip + 1);
    						}
    					}
    				}
    
    				//itemstack.getTagCompound().setInteger("currentReloadTime", 0);
    				currentReload = 0;
    				props.setReloadingState(0);
    				//Fallout.isReloading = false;
    			}
    		}
    	}
    }

     

     

    I've experimented by moving !world.isRemote to different places within the method, but anything below it won't be activated.

  10. Title explains it, but when a key is pressed it sets this method in motion. The method goes through and the itemstack visually decreases, but when you right click or open the inventory the itemstack is reset back to what it was previously.

     

     

    @Override
    public void onUpdate(ItemStack itemstack, World world, Entity entity, int metadata, boolean bool)
    {
    currentShot++;
    currentReload++;
    
    if (entity instanceof EntityPlayer)
    {
    	EntityPlayer player = (EntityPlayer) entity;
    	FalloutPlayer props = FalloutPlayer.get(player);
    
    	if (clipCount < clipSize && props.getReloadingState() == 1 && player.inventory.hasItem(ammoType))
    	{
    		player.playSound(reloadSound, 1.0F, 1);
    
    		for (int i = 0; i < clipSize; i++)
    		{
    			if (player.inventory.hasItem(ammoType) && clipCount < clipSize)
    			{
    				player.inventory.consumeInventoryItem(ammoType);
    				player.inventory.markDirty();
    				player.inventoryContainer.detectAndSendChanges();
    				clipCount++;
    			}
    		}
    
    		currentReload = 0;
    		props.setReloadingState(0);
    	}
    }
    }

     

  11. Sorry about that :/ it's just this error is so strange and I'm quite confused by it. However, the last block I posted was what was causing it, unsure why though. What I was trying to do there was detect when a player was drinking from a water bottle.

  12. Well I found out what was causing that wall of text, it was this:

     

    	@SubscribeEvent
    public void onEntityUseItem(PlayerUseItemEvent event)
    {
    	EntityPlayer player = (EntityPlayer) event.entity;
    	FalloutPlayer props = FalloutPlayer.get((EntityPlayer) event.entity);
    
    	System.out.println(event.item.getDisplayName());
    
    	if (event.item == new ItemStack(Items.potionitem))//.equals(new ItemStack(Items.potionitem)))
    	{
    		props.setCurrentThirst(-50);
    		System.out.println("kek");
    	}
    }

     

    Any idea why?

  13. Yep, I did remove that. I think it's coming from an error within the datawatcher, it's kinda freaking out about one of the values. A new error appeared in addition to the old one.

     

    New error:

    [00:33:04] [server thread/ERROR] [FML]: Failed to load extended properties for ExtendedPlayer.  This is a mod issue.
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NullPointerException
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at blfngl.fallout.player.FalloutPlayer.loadNBTData(FalloutPlayer.java:102)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.entity.Entity.readFromNBT(Entity.java:1710)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.server.management.ServerConfigurationManager.readPlayerDataFromFile(ServerConfigurationManager.java:300)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:123)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:237)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.access$100(NetworkDispatcher.java:50)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:189)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:270)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:208)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:798)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540)
    [00:33:04] [server thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.Thread.run(Unknown Source)
    [00:33:04] [server thread/INFO]: Player232[local:E:a60e33f5] logged in with entity id 406 at (244.42098377011422, 74.0, 246.1725924748317)

     

    That specific line references:

    	this.player.getDataWatcher().updateObject(Fallout.RAD_WATCHER, properties.getInteger("CurrentRads"));

     

    It's value is set to 20, an ID which is free I believe.

     

    I also completely removed the registry for the event handler and the error message would still appear but without any references inside it.

  14. Yeah, I know it's bad design haha I wrote this 3 years ago and haven't gotten around to cleaning up the code form. I did it back then because I thought it would save time in writing out all the item names, so I didn't have to put Fallout. in front of all of them. This was when I was learning java :/ Probably should get around to removing that lol.

     

    Vanilla block drops:

    public class VanillaBlockDrops
    {
    @SubscribeEvent
    public void on(HarvestDropsEvent event)
    {
    	if (event.state instanceof BlockLeaves)
    	{
    		event.dropChance = 0.1F;
    		event.drops.add(new ItemStack(Fallout.mutfruit));
    	}
    }
    }

     

    FalloutConfig:

    public class FalloutConfig
    {
    public static void createModInfo(FMLPreInitializationEvent event)
    {
    	ModMetadata var2 = event.getModMetadata();
    	var2.authorList = Arrays.asList(new String[] {"Blfngl"});
    	var2.autogenerated = false;
    	var2.modId = "fallout";
    	var2.name = "The Fallout Mod";
    	var2.description = "A mod in which most of the items from all of the Fallout games will be added." +
    			" Most everything will be there, but this will take a very long time, mainly because the Fallout universe is so huge. " +
    			"I am 100% dedicated to this mod and one day it will be completed. After looking around for a Fallout mod and finding some, " +
    			"but none that were fully completed or updated to the current version, I was very disappointed and hoped for one to be updated eventually. " +
    			"Alas, none of that was true. So I took matters into my own hands and this was the product.";
    	var2.version = "0.1.6 [1.8]";
    	var2.credits = "Mojang, MinecraftForge and everyone that uses this mod ";
    	var2.logoFile = "fallout:textures/gui/blflogo.png";
    	var2.url = "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2286972-";
    }
    
    public static void syncConfig()
    {
    	Fallout.doExplosionsDamageTerrain = Fallout.config.get(Configuration.CATEGORY_GENERAL, "ExplosionsDamageTerrain", false).getBoolean(true);
    	Fallout.doAutoStimpaksNotify = Fallout.config.get(Configuration.CATEGORY_GENERAL, "AutoInjectStimpakNotification", true).getBoolean(true);
    	Fallout.playDeathMusic = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PlayDeathMusic", true).getBoolean(true);
    	Fallout.canIrradiate = Fallout.config.get(Configuration.CATEGORY_GENERAL, "CanIrradiate", true).getBoolean(true);
    
    	Fallout.potionBuffoutId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionBuffoutId", 40).getInt();
    	Fallout.potionAddictedId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionAddictedId", 41).getInt();
    	Fallout.potionRadResistId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionRadResistId", 42).getInt();
    	Fallout.potionCloudKissId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionCloudKissId", 43).getInt();
    	Fallout.potionMinorRadId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionMinorRadId", 44).getInt();
    	Fallout.potionAdvancedRadId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionAdvancedRadId", 45).getInt();
    	Fallout.potionCriticalRadId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionCriticalRadId", 46).getInt();
    	Fallout.potionDeadlyRadId = Fallout.config.get(Configuration.CATEGORY_GENERAL, "PotionDeadlyRadId", 47).getInt();
    
    	Fallout.config.save();
    	System.out.println("Fallout config loaded...");
    }
    
    @EventHandler
    public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event)
    {
    	if(event.modID.equals("fallout"))
    		syncConfig();
    }
    }

     

     

    ClientProxy:

    public class ClientProxy extends CommonProxy
    {
    @Override
    @SideOnly(Side.CLIENT)
    public void initRender()
    {
    	EventBus eventBus = FMLCommonHandler.instance().bus();
    	eventBus.register(new FalloutKeyBinding());
    
    	RenderManager render = Minecraft.getMinecraft().getRenderManager();
    	//MinecraftForge.EVENT_BUS.register(new GuiRadBar(Minecraft.getMinecraft()));
    	RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderSnowball(render, Fallout.grenade, null));
    
    	RenderingRegistry.registerEntityRenderingHandler(EntityFeralGhoul.class, new RenderFeralGhoul(render, new ModelBiped(), 0.5F));
    	RenderingRegistry.registerEntityRenderingHandler(EntityGhoulRoamer.class, new RenderGhoulRoamer(render, new ModelBiped(), 0.5F));
    	RenderingRegistry.registerEntityRenderingHandler(EntityGhoulReaver.class, new RenderGhoulReaver(render, new ModelBiped(), 0.5F));
    	RenderingRegistry.registerEntityRenderingHandler(EntityAnt.class, new RenderAnt(render, new ModelSpider(), 0.5F));
    }
    }

     

  15. The weirdest thing just happened, I removed a tileentity I had been working on and the game will stop crashing, however the error is still thrown. I also moved the client/server stuff in the event handler to their own classes and registered on both client/server but it didn't change anything. Here's the Fallout class:

     

    package blfngl.fallout;
    
    import java.util.ArrayList;
    import java.util.List;
    
    import net.minecraft.block.Block;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemArmor.ArmorMaterial;
    import net.minecraft.potion.Potion;
    import net.minecraft.stats.Achievement;
    import net.minecraft.util.DamageSource;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.common.config.Configuration;
    import net.minecraftforge.fml.common.FMLCommonHandler;
    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.FMLPostInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
    import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
    import net.minecraftforge.fml.common.network.NetworkRegistry;
    import blfngl.fallout.init.Armor;
    import blfngl.fallout.init.BlocksFallout;
    import blfngl.fallout.init.ChemEffects;
    import blfngl.fallout.init.Chems;
    import blfngl.fallout.init.Entities;
    import blfngl.fallout.init.Food;
    import blfngl.fallout.init.Guns;
    import blfngl.fallout.init.Hooks;
    import blfngl.fallout.init.Melee;
    import blfngl.fallout.init.Misc;
    import blfngl.fallout.init.Recipes;
    import blfngl.fallout.init.Throwing;
    import blfngl.fallout.init.Unarmed;
    import blfngl.fallout.proxy.ClientProxy;
    import blfngl.fallout.proxy.CommonProxy;
    import blfngl.fallout.proxy.PacketPipeline;
    import blfngl.fallout.render.RenderItems;
    import blfngl.fallout.server.command.CommandFallout;
    import blfngl.fallout.server.command.CommandGetSkills;
    import blfngl.fallout.server.command.CommandRadStats;
    import blfngl.fallout.server.command.CommandSetSkills;
    import blfngl.fallout.util.ChemEffectHandler;
    import blfngl.fallout.util.FalloutAchievement;
    import blfngl.fallout.util.FalloutConfig;
    import blfngl.fallout.util.FalloutEventHandler;
    import blfngl.fallout.util.VanillaBlockDrops;
    
    @Mod(modid = "fallout", name = "The Fallout Mod", version = "[1.8] v0.1.6", guiFactory = "blfngl.fallout.util.FalloutGuiFactory")
    public class Fallout
    {
    @Instance("fallout")
    public static Fallout instance;	
    @SidedProxy(clientSide = "blfngl.fallout.proxy.ClientProxy", serverSide = "blfngl.fallout.proxy.CommonProxy", modId = "fallout")
    public static CommonProxy proxy;
    
    public static final int GUI_PIPBOY_ID = 0;
    public static final int GUI_WORKBENCH_ID = 1;
    public static final int GUI_RELOADINGBENCH_ID = 2;
    public static final int GUI_WELCOME_ID = 3;
    public static final int GUI_POWERCRAFTING_ID = 4;
    public static final int GUI_PIPBOYSTATS_ID = 5;
    
    public static final int RAD_WATCHER = 20;
    public static final int THIRST_WATCHER = 14;
    public static final int ADDICTION = 21;
    public static final int RAD_REDUCTION = 22;
    public static final int IS_RELOADING = 23;
    
    public static final int SKILL_MEDICINE = 30;
    public static final int SKILL_GUNS = 31;
    public static final int SKILL_ENERGY = 24;
    public static final int SKILL_EXPLOSIVES = 25;
    public static final int SKILL_MELEE = 26;
    public static final int SKILL_REPAIR = 27;
    public static final int SKILL_SCIENCE = 28;
    public static final int SKILL_SURVIVAL = 29;
    public static final int SKILL_UNARMED = 19;
    
    public static final int STRENGTH = 43;
    public static final int ENDURANCE = 45;
    public static final int INTELLIGENCE = 47;
    public static final int AGILITY = 48;
    public static final int LUCK = 49;
    
    public static final int NBT_TAG_COMPOUND = 0;
    public static final String PACKET_CHANNEL = "FALLOUT";
    public static final String VERSION = "[1.8] v0.1.8";
    public static final PacketPipeline packetPipeline = new PacketPipeline();
    public static Configuration config;
    
    public static boolean doExplosionsDamageTerrain = false;
    public static boolean doAutoStimpaksNotify = true;
    public static boolean isPoisonActive = false;
    public static boolean playDeathMusic = true;
    public static boolean canIrradiate = true;
    
    public static DamageSource sourceGun = new DamageSource("fallout.gun");
    
    public static Block workbench;
    public static Block reloadingBench;
    public static Block betterTable;
    public static Block irradiatedGrass;
    public static Block irradiatedSand;
    public static Block irradiatedStone;
    public static Block irradiatedDirt;
    
    public static Block caveFungus;
    
    public static CreativeTabs tabMisc;
    public static CreativeTabs tabChems;
    public static CreativeTabs tabArmor;
    public static CreativeTabs tabMelee;
    public static CreativeTabs tabPistols;
    public static CreativeTabs tabBlocks;
    public static CreativeTabs tabShotguns;
    public static CreativeTabs tabHeavy;
    public static CreativeTabs tabEnergy;
    
    public static Item antivenom;
    public static Item stimpak;
    public static Item superStimpak;
    public static Item buffout;
    public static Item cateye;
    public static Item fixer;
    public static Item jet;
    public static Item doctorBag;
    public static Item healingPowder;
    public static Item healingPoultice;
    public static Item hydra;
    public static Item medX;
    public static Item psycho;
    public static Item rebound;
    public static Item turbo;
    public static Item autoStimpak;
    public static Item autoSuperStimpak;
    public static Item radX;
    public static Item snakebiteTourniquet;
    public static Item stealthboy;
    public static Item jetDixon;
    public static Item ultrajet;
    public static Item slasher;
    public static Item weaponKit;
    public static Item radAway;
    
    public static Item mutfruit;
    public static Item brocFlower;
    public static Item xanderRoot;
    public static Item agave;
    public static Item barrelCactus;
    public static Item bananaYucca;
    public static Item caveFungusItem;
    
    public static Block blockXanderRoot;
    public static Block blockBrocFlower;
    
    public static Item nukaCola;
    
    public static Item emptySyringe;
    public static Item jetInhaler;
    public static Item leatherBelt;
    public static Item sodaBottle;
    public static Item bottleCap;
    public static Item sensorModule;
    public static Item nightstalkerBlood;
    public static Item radscorpionGland;
    public static Item saturniteIngot;
    public static Item abraxo;
    public static Item plasticScrap;
    public static Item plasticPiping;
    public static Item geckoHide;
    public static Item goldenGeckoHide;
    public static Item fireGeckoHide;
    public static Item greenGeckoHide;
    
    public static Item round357;
    public static Item round44;
    public static Item round45;
    public static Item round556;
    public static Item round9mm;
    public static Item round10mm;
    public static Item roundGovt;
    public static Item round127;
    public static Item round22;
    public static Item round5mm;
    public static Item round50mg;
    public static Item round308;
    public static Item bb;
    public static Item shell20;
    public static Item shell12;
    public static Item nail;
    
    public static Item case357;
    public static Item case44;
    public static Item case45;
    public static Item case556;
    
    public static Item partChamber;
    public static Item partBarrel;
    public static Item partHammer;
    public static Item partWoodStock;
    public static Item partTrigger;
    public static Item partHandle;
    public static Item partSlide;
    public static Item partRifleBarrel;
    
    public static Item cellMicrofusion;
    public static Item alienPowerCell;
    public static Item flamerFuel;
    public static Item energyCell;
    public static Item missile;
    
    public static Item pistol357;
    public static Item lucky;
    public static Item pistol44;
    public static Item mysteriousMagnum;
    public static Item pistol45;
    public static Item lightDarkness;
    public static Item pistol556;
    public static Item thatGun;
    public static Item pistol9mm;
    public static Item maria;
    public static Item pistol10mm;
    public static Item pistolWeathered;
    public static Item pistol127mm;
    public static Item lilDevil;
    public static Item huntingRevolver;
    public static Item rangerSequoia;
    public static Item pistolPolice;
    public static Item pistol22;
    
    public static Item rifleMateriel;
    public static Item rifleAssaultCarbine;
    public static Item rifleAutomatic;
    public static Item rifleBattle;
    public static Item thisMachine;
    public static Item rifleBB;
    public static Item rifleAbilene;
    public static Item rifleBrush;
    public static Item medicineStick;
    public static Item cowboyRepeater;
    public static Item rifleCarabine;
    public static Item rifleHunting;
    public static Item paciencia;
    public static Item rifleLmg;
    public static Item bozar;
    public static Item rifleMarksman;
    public static Item allAmerican;
    public static Item rifleService;
    public static Item rifleSurvival;
    public static Item rifleSniper;
    public static Item rifleCos;
    public static Item rifleGobi;
    public static Item rifleTrail;
    public static Item rifleVarmint;
    public static Item ratslayer;
    
    public static Item shotgunCaravan;
    public static Item shotgunSturdy;
    public static Item shotgunHunting;
    public static Item dinnerBell;
    public static Item shotgunLever;
    public static Item shotgunRiot;
    public static Item shotgunSawed;
    public static Item bigBoomer;
    public static Item shotgunSingle;
    
    public static Item smg45;
    public static Item smg9mm;
    public static Item smgVance;
    public static Item smg10mm;
    public static Item sleepytyme;
    public static Item smg127mm;
    public static Item nailgun;
    public static Item smg22mm;
    
    public static Item alienBlaster;
    public static Item cFinder;
    public static Item flareGun;
    public static Item laserPistol;
    public static Item complianceRegulator;
    public static Item pewPew;
    public static Item plasmaDefender;
    public static Item plasmaPistol;
    public static Item pulseGun;
    public static Item rechargerPistol;
    public static Item hyperbreeder;
    public static Item sonicEmitter;
    
    public static Item gaussRifle;
    public static Item YCS;
    public static Item holorifle;
    public static Item laer;
    public static Item laerElijah;
    public static Item rcw;
    public static Item laserRifle;
    public static Item AER14;
    public static Item laserRifleVanGraff;
    public static Item multiplaRifle;
    public static Item plasmaRifle;
    public static Item plasmaRifleVanGraff;
    public static Item Q35;
    public static Item rechargerRifle;
    public static Item triBeamRifle;
    
    public static Item missileLauncher;
    
    public static Item cleaver;
    public static Item bladeOfTheEast;
    public static Item cosmicKnife;
    public static Item cosmicClean;
    public static Item cosmicHeated;
    public static Item ohBaby;
    public static Item bladeOfTheWest;
    public static Item knockKnock;
    public static Item inverseAxe;
    public static Item antenna;
    public static Item nukaBreaker;
    
    public static Item powerFist;
    public static Item saturniteFist;
    public static Item ballisticFist;
    public static Item displacerGlove;
    public static Item twoStep;
    
    public static Item grenade;
    public static Item spear;
    
    public static Item pipboy;
    
    public static Item cloudKiss;
    
    public static Item helm45;
    public static Item chest45;
    public static Item legs45;
    public static Item boots45;
    public static Item helmRecon;
    public static Item chestRecon;
    public static Item legsRecon;
    public static Item bootsRecon;
    public static Item helm51;
    public static Item chest51;
    public static Item legs51;
    public static Item boots51;
    public static Item helmRad;
    public static Item chestRad;
    public static Item legsRad;
    public static Item bootsRad;
    public static Item helmRiotElite;
    public static Item chestRiotElite;
    public static Item legsRiotElite;
    public static Item bootsRiotElite;
    public static Item chestGecko;
    public static Item legsGecko;
    public static Item bootsGecko;
    public static Item helmLeather;
    public static Item chestLeather;
    public static Item legsLeather;
    public static Item bootsLeather;
    
    public static Item recBlueMoon;
    public static Item recKickHead;
    
    public static Potion potionBuffout;
    public static Potion potionAddicted;
    public static Potion potionRadResist;
    public static Potion potionCloudKiss;
    public static Potion potionMinorRad;
    public static Potion potionAdvancedRad;
    public static Potion potionCriticalRad;
    public static Potion potionDeadlyRad;
    
    public static int potionBuffoutId;
    public static int potionAddictedId;
    public static int potionRadResistId;
    public static int potionCloudKissId;
    public static int potionMinorRadId;
    public static int potionAdvancedRadId;
    public static int potionCriticalRadId;
    public static int potionDeadlyRadId;
    
    public static ArmorMaterial falloutLeather;
    
    public static Achievement shootEmUp;
    
    public static List<Item> namesList = new ArrayList<Item>();
    
    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    	System.out.println("Blfngl's Fallout mod loading...");
    
    	FMLCommonHandler.instance().bus().register(new FalloutConfig());
    	config = new Configuration(event.getSuggestedConfigurationFile());
    	config.load();
    	FalloutConfig.syncConfig();
    	FalloutConfig.createModInfo(event);
    
    	ChemEffectHandler.init();
    
    	MinecraftForge.EVENT_BUS.register(new FalloutEventHandler());
    	MinecraftForge.EVENT_BUS.register(new VanillaBlockDrops());
    	//FMLCommonHandler.instance().bus().register(new FalloutEventHandler());
    	FMLCommonHandler.instance().bus().register(new VanillaBlockDrops());
    
    	FMLCommonHandler.instance().bus().register(new ClientProxy());
    	Entities.init();
    }
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
    	Misc.init();
    	BlocksFallout.init();
    	Armor.init();
    	Chems.init();
    	Melee.init();
    	Unarmed.init();
    	Guns.init();
    	Throwing.init();
    	ChemEffects.init();
    	Food.init();
    	Recipes.init();
    	Hooks.init();
    	FalloutAchievement.init();
    
    	RenderItems.doRender(event);
    	NetworkRegistry.INSTANCE.registerGuiHandler(this, new CommonProxy());
    	packetPipeline.initialise();
    	proxy.initRender();
    }
    
    @EventHandler
    public void serverLoad(FMLServerStartingEvent event)
    {
    	event.registerServerCommand(new CommandGetSkills());
    	event.registerServerCommand(new CommandFallout());
    	event.registerServerCommand(new CommandRadStats());
    	event.registerServerCommand(new CommandSetSkills());
    
    	System.out.println("Fallout commands loaded");
    }
    
    @EventHandler
    public static void postInit(FMLPostInitializationEvent event)
    {
    	System.out.println("Blfngl's Fallout mod loaded!");
    }
    }
    

     

  16. Out of the blue, eclipse would throw this huge error but would still be able to load the game, however it will crash upon trying to access certain parts of the mod. I have no idea where this is coming from, it literally appeared out of no where. I wasn't even editing the class it was referencing.

     

    Error:

    Time: 7/6/15 11:00 PM
    Description: Loading screen debug info
    
    This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.8
    Operating System: Windows 8.1 (amd64) version 6.3
    Java Version: 1.8.0_25, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 725432040 bytes (691 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 353.06' Renderer: 'GeForce GTX 860M/PCIe/SSE2'
    [23:00:04] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
    [23:00:04] [Client thread/INFO] [FML]: MinecraftForge v11.14.3.1450 Initialized
    [23:00:04] [Client thread/INFO] [FML]: Replaced 204 ore recipies
    [23:00:04] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
    [23:00:04] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
    [23:00:04] [Client thread/INFO] [FML]: Searching C:\Users\Nick\Documents\My Games\Minecraft\[1.8]Fallout\eclipse\mods for mods
    [23:00:06] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
    [23:00:06] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, fallout] at CLIENT
    [23:00:06] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, fallout] at SERVER
    [23:00:06] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:The Fallout Mod
    [23:00:06] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
    [23:00:06] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
    [23:00:06] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
    [23:00:06] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
    [23:00:06] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
    [23:00:06] [Client thread/INFO] [sTDOUT]: [blfngl.fallout.Fallout:preInit:394]: Blfngl's Fallout mod loading...
    [23:00:06] [Client thread/INFO] [sTDOUT]: [blfngl.fallout.util.FalloutConfig:syncConfig:49]: Fallout config loaded...
    [23:00:06] [Client thread/INFO] [sTDOUT]: [blfngl.fallout.util.ChemEffectHandler:init:31]: Potions loaded successfully.
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.InstantiationException
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:103)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:85)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at blfngl.fallout.Fallout.preInit(Fallout.java:404)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:248)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.client.Minecraft.startGame(Minecraft.java:446)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.client.Minecraft.run(Minecraft.java:356)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.client.main.Main.main(Main.java:117)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.reflect.Method.invoke(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    [22:49:02] [Client thread/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at GradleStart.main(Unknown Source)

     

     

    Line 404:

    MinecraftForge.EVENT_BUS.register(new FalloutEventHandler());

     

    FalloutEventHandler:

    package blfngl.fallout.util;
    
    import net.minecraft.entity.effect.EntityLightningBolt;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.init.Items;
    import net.minecraft.item.ItemStack;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.potion.Potion;
    import net.minecraft.potion.PotionEffect;
    import net.minecraft.util.DamageSource;
    import net.minecraft.world.EnumDifficulty;
    import net.minecraftforge.client.event.GuiOpenEvent;
    import net.minecraftforge.event.entity.EntityEvent.EntityConstructing;
    import net.minecraftforge.event.entity.EntityJoinWorldEvent;
    import net.minecraftforge.event.entity.item.ItemTossEvent;
    import net.minecraftforge.event.entity.living.LivingDeathEvent;
    import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
    import net.minecraftforge.event.entity.living.LivingHurtEvent;
    import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
    import net.minecraftforge.event.world.ExplosionEvent;
    import net.minecraftforge.fml.client.GuiIngameModOptions;
    import net.minecraftforge.fml.common.eventhandler.EventPriority;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    import blfngl.fallout.Fallout;
    import blfngl.fallout.gui.GuiFalloutConfig;
    import blfngl.fallout.player.FalloutPlayer;
    
    public class FalloutEventHandler extends Fallout
    {
    @SubscribeEvent
    public void onEntityUpdate(LivingUpdateEvent event) 
    {
    	if (event.entity instanceof EntityPlayer)
    	{
    		EntityPlayer player = (EntityPlayer) event.entity;
    		FalloutPlayer props = FalloutPlayer.get((EntityPlayer) event.entity);
    
    		if (player.isPotionActive(Fallout.potionCloudKiss)) {}
    
    		if (!player.isPotionActive(Fallout.potionRadResist))
    		{
    			props.setRadReduction(0);
    		}
    
    		/*if ((player.worldObj.getBlockState(new BlockPos((int) player.posX, (int) player.posY - 1, (int) player.posZ)) instanceof BlockGrass ||
    				player.worldObj.getBlockState(new BlockPos((int) player.posX, (int) player.posY - 1, (int) player.posZ)) instanceof BlockSand ||
    				player.worldObj.getBlockState(new BlockPos((int) player.posX, (int) player.posY - 1, (int) player.posZ)) instanceof BlockStone ||
    				player.worldObj.getBlockState(new BlockPos((int) player.posX, (int) player.posY - 1, (int) player.posZ))  instanceof BlockDirt) &&
    				!player.capabilities.isCreativeMode && canIrradiate)
    		{
    			if ((int) (Math.random() * 60) == 1)
    				props.addRadiation(1);
    		}*/
    
    		if (props.getAddicted() > 0)
    		{
    			player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 0));
    			player.addPotionEffect(new PotionEffect(Fallout.potionAddicted.id, 20, 0));
    		}
    
    		if (props.getCurrentRads() >= 200 && props.getCurrentRads() < 400)
    		{
    			player.addPotionEffect(new PotionEffect(Fallout.potionMinorRad.id, 20, 0));
    			player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 20, 0));
    		}
    
    		if (props.getCurrentRads() >= 400 && props.getCurrentRads() < 600)
    		{
    			player.addPotionEffect(new PotionEffect(Fallout.potionAdvancedRad.id, 20, 0));
    			player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 20, 1));
    			player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 0));
    		}
    
    		if (props.getCurrentRads() >= 600 && props.getCurrentRads() < 800)
    		{
    			player.addPotionEffect(new PotionEffect(Fallout.potionCriticalRad.id, 20, 0));
    			player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 20, 2));
    			player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 2));
    			player.addPotionEffect(new PotionEffect(Potion.weakness.id, 20, 0));
    		}
    
    		if (props.getCurrentRads() >= 800)
    		{
    			player.addPotionEffect(new PotionEffect(Fallout.potionDeadlyRad.id, 20, 0));
    			player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 20, 2));
    			player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 20, 2));
    			player.addPotionEffect(new PotionEffect(Potion.weakness.id, 20, 1));			
    		}
    
    		if (props.getCurrentRads() >= 1000 || props.getCurrentThirst() >= 1000)
    		{
    			player.attackEntityFrom(DamageSource.magic, 99999);
    			props.setCurrentRads(0);
    			props.setCurrentThirst(0);
    		}
    
    		if (!player.capabilities.isCreativeMode)
    		{
    			if (player.worldObj.getDifficulty() != EnumDifficulty.PEACEFUL)
    				if (player.worldObj.getTotalWorldTime() % 20 == 0)
    					props.setCurrentThirst(props.getCurrentThirst() + 1);
    
    
    			if (player.worldObj.getDifficulty() == EnumDifficulty.NORMAL || player.worldObj.getDifficulty() == EnumDifficulty.HARD)
    				if (player.worldObj.getTotalWorldTime() % 50 == 0)
    					props.setCurrentRads(props.getCurrentRads() + 1);
    		}
    	}
    }
    
    @SubscribeEvent
    public void onEntityUseItem(PlayerUseItemEvent event)
    {
    	EntityPlayer player = (EntityPlayer) event.entity;
    	FalloutPlayer props = FalloutPlayer.get((EntityPlayer) event.entity);
    
    	System.out.println(event.item.getDisplayName());
    
    	if (event.item == new ItemStack(Items.potionitem))//.equals(new ItemStack(Items.potionitem)))
    	{
    		props.setCurrentThirst(-50);
    		System.out.println("kek");
    	}
    }
    
    @SubscribeEvent
    public void onEntityAttack(LivingHurtEvent event)
    {
    	if (event.entity instanceof EntityPlayer)
    	{
    
    	}
    
    	/**if (Fallout.isPoisonActive)
    	{
    		event.entityLiving.addPotionEffect(new PotionEffect(Fallout.potionCloudKiss.id, 20 * 10, 0, true));
    		Fallout.isPoisonActive = false;
    	}*/
    }
    
    @SubscribeEvent
    public void onEntityJoinWorld(EntityJoinWorldEvent event)
    {
    
    }
    
    @SubscribeEvent
    public void onLivingDeathEvent(LivingDeathEvent event)
    {
    	if (event.entity instanceof EntityPlayer && Fallout.playDeathMusic)
    	{
    		event.entity.worldObj.playSoundAtEntity(event.entity, "fallout:playerDeath", 1.0F, 1);
    	}
    
    	if (!event.entity.worldObj.isRemote && event.entity instanceof EntityPlayer)
    	{
    		NBTTagCompound playerData = new NBTTagCompound();
    		((FalloutPlayer) event.entity.getExtendedProperties(FalloutPlayer.EXT_PROP_NAME)).saveNBTData(playerData);
    		proxy.storeEntityData(((EntityPlayer) event.entity).getCommandSenderEntity().getName(), playerData);
    		FalloutPlayer.saveProxyData((EntityPlayer) event.entity);
    	}
    }
    
    @SubscribeEvent
    public void onEntityConstructing(EntityConstructing event)
    {
    	if (event.entity instanceof EntityPlayer && FalloutPlayer.get((EntityPlayer) event.entity) == null)
    	{
    		EntityPlayer player = (EntityPlayer)event.entity;
    
    		FalloutPlayer.register(player);
    
    		//player.openGui(Fallout.instance, Fallout.GUI_WELCOME_ID, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ);
    	}
    
    	/*if (!event.entity.worldObj.isRemote && event.entity instanceof EntityPlayer)
    	{
    		EntityPlayer player = (EntityPlayer) event.entity;
    		NBTTagCompound playerData = proxy.getEntityData((player.getCommandSenderName()));
    
    		if (playerData != null)
    		{
    			((FalloutPlayer)(event.entity.getExtendedProperties(FalloutPlayer.EXT_PROP_NAME))).loadNBTData(playerData);
    		}
    
    		Fallout.packetPipeline.sendTo(new SyncPlayerPropsPacket(player), (EntityPlayerMP) player);
    		//((FalloutPlayer)(event.entity.getExtendedProperties(FalloutPlayer.EXT_PROP_NAME))); //.syncExtendedProperties();
    	}*/
    }
    
    @SubscribeEvent
    public void lol(ItemTossEvent event)
    {
    	if (Math.random() * 10000 == 1)
    	{
    		event.entity.worldObj.spawnEntityInWorld(new EntityLightningBolt(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ));
    	}
    }
    
    @SubscribeEvent
    public void onExplosion(ExplosionEvent event)
    {
    	System.out.println(Fallout.doExplosionsDamageTerrain);
    	event.explosion.doExplosionB(false);
    }
    
    @SideOnly(Side.CLIENT)
    @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)
    public void onEvent(GuiOpenEvent event)
    {
    	if (event.gui instanceof GuiIngameModOptions)
    		event.gui = new GuiFalloutConfig(null);   
    }
    }

     

     

    Help?

  17. Hey, I've been searching for a solution for a few days now but haven't been able to find anything that fixes my problem. My keybindings crash the server version of the mod, and setting them up in my client proxy doesn't seem to fix it. Help?

     

    Client Proxy:

    package blfngl.fallout.proxy;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.model.ModelBiped;
    import net.minecraft.client.model.ModelSpider;
    import net.minecraft.client.renderer.entity.RenderSnowball;
    import net.minecraftforge.common.MinecraftForge;
    import net.minecraftforge.fml.client.registry.ClientRegistry;
    import net.minecraftforge.fml.client.registry.RenderingRegistry;
    import net.minecraftforge.fml.common.FMLCommonHandler;
    import net.minecraftforge.fml.common.eventhandler.EventBus;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    import blfngl.fallout.Fallout;
    import blfngl.fallout.entity.EntityAnt;
    import blfngl.fallout.entity.EntityFeralGhoul;
    import blfngl.fallout.entity.EntityGhoulReaver;
    import blfngl.fallout.entity.EntityGhoulRoamer;
    import blfngl.fallout.entity.projectile.EntityGrenade;
    import blfngl.fallout.gui.GuiRadBar;
    import blfngl.fallout.render.RenderAnt;
    import blfngl.fallout.render.RenderFeralGhoul;
    import blfngl.fallout.render.RenderGhoulReaver;
    import blfngl.fallout.render.RenderGhoulRoamer;
    import blfngl.fallout.util.FalloutKeyBinding;
    
    public class ClientProxy extends CommonProxy
    {
    @Override
    @SideOnly(Side.CLIENT)
    public void initRender()
    {
    	EventBus eventBus = FMLCommonHandler.instance().bus();
    	eventBus.register(new FalloutKeyBinding());
    
    	//FMLCommonHandler.instance().bus().register(new KeyInputHandler());
    
    	MinecraftForge.EVENT_BUS.register(new GuiRadBar(Minecraft.getMinecraft()));
    	RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), Fallout.grenade, Minecraft.getMinecraft().getRenderItem()));
    
    	RenderingRegistry.registerEntityRenderingHandler(EntityFeralGhoul.class, new RenderFeralGhoul(Minecraft.getMinecraft().getRenderManager(), new ModelBiped(), 0.5F));
    	RenderingRegistry.registerEntityRenderingHandler(EntityGhoulRoamer.class, new RenderGhoulRoamer(Minecraft.getMinecraft().getRenderManager(), new ModelBiped(), 0.5F));
    	RenderingRegistry.registerEntityRenderingHandler(EntityGhoulReaver.class, new RenderGhoulReaver(Minecraft.getMinecraft().getRenderManager(), new ModelBiped(), 0.5F));
    	RenderingRegistry.registerEntityRenderingHandler(EntityAnt.class, new RenderAnt(Minecraft.getMinecraft().getRenderManager(), new ModelSpider(), 0.5F));
    
    	/**RenderingRegistry.registerEntityRenderingHandler(EntityBullet.class, new RenderSnowball(Fallout.emptySyringe));
    	LanguageRegistry.instance().addStringLocalization("entity.bullet.fallout.name", "fallout");
    
    	RenderingRegistry.registerEntityRenderingHandler(EntityMissile.class, new RenderSnowball(Fallout.emptySyringe));
    	LanguageRegistry.instance().addStringLocalization("entity.rocket.fallout.name", "fallout");
    
    	RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderSnowball(Fallout.emptySyringe));
    	LanguageRegistry.instance().addStringLocalization("entity.missile.fallout.name", "fallout");
    
    	RenderingRegistry.registerEntityRenderingHandler(EntityPellet.class, new RenderSnowball(Fallout.emptySyringe));
    	LanguageRegistry.instance().addStringLocalization("entity.pellet.fallout.name", "fallout");
    
    	RenderingRegistry.registerEntityRenderingHandler(EntitySpear.class, new RenderSnowball(Items.arrow));
    	LanguageRegistry.instance().addStringLocalization("entity.spear.fallout.name", "fallout");
    
    	RenderingRegistry.registerEntityRenderingHandler(EntityPlasma.class, new RenderSnowball(Items.slime_ball));*/
    }
    }

     

     

    FalloutKeyBinding:

    package blfngl.fallout.util;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.settings.KeyBinding;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraftforge.fml.client.registry.ClientRegistry;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
    import net.minecraftforge.fml.relauncher.Side;
    import net.minecraftforge.fml.relauncher.SideOnly;
    
    import org.lwjgl.input.Keyboard;
    
    import blfngl.fallout.player.FalloutPlayer;
    
    public class FalloutKeyBinding
    {
    public static int keyReload = Keyboard.KEY_R;
    
    @SideOnly(Side.CLIENT)
    public KeyBinding reloadKey = new KeyBinding("Reload", keyReload, "key.categories.fallout");
    
    public FalloutKeyBinding()
    {
    	ClientRegistry.registerKeyBinding(reloadKey);
    }
    
    @SubscribeEvent
    @SideOnly(Side.CLIENT)
    public void KeyInputEvent(KeyInputEvent event)
    {
    	EntityPlayer player = Minecraft.getMinecraft().thePlayer;
    
    	if (reloadKey.isKeyDown())
    	{
    		FalloutPlayer props = FalloutPlayer.get(player);
    		props.setReloadingState(1);
    		System.out.println(player.getName() + " is reloading!");
    	}
    }
    }

     

     

    I also register my client proxy in the event bus within the preInit method of my main file.

     

    preInit()

    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
    	System.out.println("Blfngl's Fallout mod loading...");
    
    	FMLCommonHandler.instance().bus().register(new FalloutConfig());
    	config = new Configuration(event.getSuggestedConfigurationFile());
    	config.load();
    	FalloutConfig.syncConfig();
    	FalloutConfig.createModInfo(event);
    
    	ChemEffectHandler.init();
    
    	MinecraftForge.EVENT_BUS.register(new FalloutEventHandler());
    	MinecraftForge.EVENT_BUS.register(new VanillaBlockDrops());
    	FMLCommonHandler.instance().bus().register(new FalloutEventHandler());
    	FMLCommonHandler.instance().bus().register(new VanillaBlockDrops());
    
    	FMLCommonHandler.instance().bus().register(new ClientProxy());
    	Entities.init();
    }

     

×
×
  • Create New...

Important Information

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