Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.8 and 1.9] Having a few issues on 1.9 and 1.8


NovaViper
 Share

Recommended Posts

I'm having issues with creating my mod for 1.8 and 1.9 so I got a couple of questions.

 

[*]In 1.8, I can't seem to get the mod to work well on the server side. I make my rendering stuff for my items and blocks load in int but it never manages to register them so it makes those missing textures blocks. BUT when I put in PreInt, it causes the server to crash with this error.

[*]Another issue relating with servers 1.8 is whenever I get the items to load by putting them in the PreInt process, I enter the game and use my entity's spawn egg and it doesn't spawn that entity, there is no error either but this isn't the same when I do this on the client side. It spawns the entity like normal but now it doesn't spawn the textures for the entity

 

Source Code for the mod is here

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

  • Replies 85
  • Created
  • Last Reply

Top Posters In This Topic

Didn't we have this already in another thread? Your Main class (TetraCraft) has a hard-reference to ModItems class here (no, it does not matter that it is inside an if statement). This ModItems class hard-references the class Registers. This class then hard-references the client-only class ModelLoader.

 

This means that your mod will always attempt to load ModelLoader, even if you are on the server.

 

You can ONLY references client-only classes from your client proxy. Directly or indirectly (if a class you added is only referenced from your ClientProxy it can of course also use client-only classes). There is no way around this. If statements will not help, hackyness will not help. You must understand and use the @SidedProxy system.

Link to comment
Share on other sites

Ok.. I moved everything to the PreInt in the Client Proxy but now nothing is showing up on the server side. The creative tab I made is completely empty and my custom entity is not spawning. This does not occur on the client side.

 

package novaviper.tetracraft.client.proxy;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import novaviper.tetracraft.client.lib.ModelJsonReference;
import novaviper.tetracraft.client.render.entity.RenderTerrakon;
import novaviper.tetracraft.common.entity.EntityTerrakon;
import novaviper.tetracraft.common.lib.ModReference;
import novaviper.tetracraft.common.lib.Registers;
import novaviper.tetracraft.common.proxy.CommonProxy;
import novaviper.tetracraft.main.*;

import static novaviper.tetracraft.main.ModBlocks.triaxOre;
import static novaviper.tetracraft.main.ModItems.ballisticBow;
import static novaviper.tetracraft.main.ModItems.triaxIngot;

/**
* Created by NovaViper on 2/6/2016.
* Class Purpose: Loads stuff on the client side
*/
public class ClientProxy extends CommonProxy {

// Client Objects\\
@Override
public void onPreInt(FMLPreInitializationEvent event){
	ModCreativeTabs.load();
	ModItems.load();
	ModBlocks.load();
	ModCrafting.load();
	ModEntities.load();

	//Blocks
	//Registers.addBlockRender(broxStone, 0, ModReference.modid + ":stone_brox", "inventory");
	Registers.addBlockRender(triaxOre, 0, ModReference.modid + ":ore_triax", "inventory");
	//Items
	addItemRender(ballisticBow, 0, ModReference.modid + ":bow_ballistic", "inventory");
	addItemRender(triaxIngot, 0, ModReference.modid + ":ingot_triax", "inventory");

	addItemVariants(ballisticBow, ModelJsonReference.getBowStandbyModel("ballistic"),
			ModelJsonReference.getBowPullingModel("ballistic", "0"), ModelJsonReference.getBowPullingModel("ballistic", "1"),
			ModelJsonReference.getBowPullingModel("ballistic", "2"));

	ModEvents.load();
}

@Override
public void onInt(FMLInitializationEvent event){
	RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
	addEntityRender(EntityTerrakon.class, new RenderTerrakon(renderManager, 0.5F));
}

@Override
public void onPostInt(FMLPostInitializationEvent event){}

@Override
public void onServerStart(FMLServerStartedEvent event){}

@Override
public void onServerStop(FMLServerStoppedEvent event){}

// Client Objects\\
@Override
public EntityPlayer getPlayerEntity(MessageContext ctx) {
	return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer
			: super.getPlayerEntity(ctx));
}

@Override
public EntityPlayer getPlayerEntity() {
	return Minecraft.getMinecraft().thePlayer;
}

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
	/*if (ID == IDs.nileTableGUI) {
		TileEntity target = world.getTileEntity(new BlockPos(x, y, z));
		if (!(target instanceof TileEntityNileWorkbench)) {
			return null;
		}

		TileEntityNileWorkbench tileNileTable = (TileEntityNileWorkbench) target;
		GuiNileWorkbench tableGui = new GuiNileWorkbench(player.inventory, tileNileTable, world, new BlockPos(x, y, z));
		return tableGui;
	}*/
	return null;
}

/*@Override
public void spawnCrit(World world, Entity entity) {
	FMLClientHandler.instance().getClient().effectRenderer.emitParticleAtEntity(entity, EnumParticleTypes.CRIT);
}*/

//Client Registers NAV
public static void addKeyBinding(KeyBinding key) {
	ClientRegistry.registerKeyBinding(key);
}

public static void bindTileEntitySpecialRenderer(Class<? extends TileEntity> tileentity, TileEntitySpecialRenderer render) {
	ClientRegistry.bindTileEntitySpecialRenderer(tileentity, render);
}

public static void addEntityRender(Class entityClass, Render render) {
	RenderingRegistry.registerEntityRenderingHandler(entityClass, render);
}

public static void addItemRender(Item item, int metadata, String itemString, String location) {
	ModelLoader.setCustomModelResourceLocation(item, metadata, new ModelResourceLocation(itemString, location));
}

public static void addItemVariants(Item item, String... names) {
	ModelBakery.addVariantName(item, names);
}
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Also, I got a question for Choonster, for the custom bow, I'm getting errors about the "this::isAmmo" references you are making. Intellij says that the current language level does not support this (I'm using the default one, which is 8 and I even tried 9 and it still gives me that error)

 

Code so far

package novaviper.tetracraft.common.item;


import akka.japi.Predicate;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import novaviper.tetracraft.common.lib.ModReference;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Enchantments;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemArrow;
import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.wrapper.PlayerOffhandInvWrapper;
import net.minecraftforge.items.wrapper.RangedWrapper;

/**
* Created by NovaViper on 2/6/2016.
* Class Purpose: Generic function class for the mod's bows
* Credit: Choonster For bow firing and boolean code!
*/
public class ItemModBow extends ItemBow {
public String bowType;

public ItemModBow(String unlocalizedName, CreativeTabs tab, String type, int maxUsage) {
	bowType = type;
	this.setUnlocalizedName(unlocalizedName);
	this.setCreativeTab(tab);
	this.setMaxDamage(maxUsage);

	// ItemBow's "pull" getter only works for Items.bow, so register a custom getter that works for any instance of this class.
	this.addPropertyOverride(new ResourceLocation(ModReference.modid, "pull"), new IItemPropertyGetter()
	{
		@SideOnly(Side.CLIENT)
		public float apply(ItemStack stack, World worldIn, EntityLivingBase entityIn)
		{
			if (entityIn == null){
				return 0.0f;
			}

			ItemStack activeItemStack = entityIn.getActiveItemStack();
			if (activeItemStack != null && activeItemStack.getItem() instanceof ItemModBow) {
				return (stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0f;
			}
			return 0.0f;
		}
	});
}

/**
 * Get an {@link IItemHandler} wrapper of the first slot in the player's inventory containing an {@link ItemStack} of ammunition.
 * <p>
 * This {@link IItemHandler} will always have a single slot containing the ammunition {@link ItemStack}.
 * <p>
 *
 * @param player The player
 * @param isAmmo A function that detects whether a given ItemStack is valid ammunition
 * @return The ammunition slot's IItemHandler, or null if there isn't any ammunition
 */
public static IItemHandler findAmmoSlot(EntityPlayer player, Predicate<ItemStack> isAmmo) {
	if (isAmmo.test(player.getHeldItemOffhand())) {
		return new PlayerOffhandInvWrapper(player.inventory);
	}

	// Vertical facing = main inventory
	final EnumFacing mainInventoryFacing = EnumFacing.UP;
	if (player.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, mainInventoryFacing)) {
		final IItemHandler mainInventory = player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, mainInventoryFacing);

		if (isAmmo.test(player.getHeldItemMainhand())) {
			final int currentItem = player.inventory.currentItem;
			return new RangedWrapper((IItemHandlerModifiable) mainInventory, currentItem, currentItem + 1);
		}

		for (int slot = 0; slot < mainInventory.getSlots(); ++slot) {
			ItemStack itemStack = mainInventory.getStackInSlot(slot);

			if (isAmmo.test(itemStack)) {
				return new RangedWrapper((IItemHandlerModifiable) mainInventory, slot, slot + 1);
			}
		}
	}

	return null;
}

/**
 * Is ammunition required to fire this bow?
 *
 * @param bow     The bow
 * @param shooter The shooter
 * @return Is ammunition required?
 */
protected boolean isAmmoRequired(ItemStack bow, EntityPlayer shooter) {
	return !shooter.capabilities.isCreativeMode && EnchantmentHelper.getEnchantmentLevel(Enchantments.infinity, bow) == 0;
}

/**
 * Nock an arrow.
 *
 * @param bow     The bow ItemStack
 * @param shooter The player shooting the bow
 * @param world   The World
 * @param hand    The hand holding the bow
 * @return The result
 */
protected ActionResult<ItemStack> nockArrow(ItemStack bow, World world, EntityPlayer shooter, EnumHand hand) {
	boolean hasAmmo = findAmmoSlot(shooter, this::isArrow) != null;

	ActionResult<ItemStack> ret = ForgeEventFactory.onArrowNock(bow, world, shooter, hand, hasAmmo);
	if (ret != null) return ret;

	if (isAmmoRequired(bow, shooter) && !hasAmmo) {
		return new ActionResult(EnumActionResult.FAIL, bow);
	} else {
		shooter.setActiveHand(hand);
		return new ActionResult(EnumActionResult.SUCCESS, bow);
	}
}

/**
 * Fire an arrow with the specified charge.
 *
 * @param bow     The bow ItemStack
 * @param world   The firing player's World
 * @param shooter The player firing the bow
 * @param charge  The charge of the arrow
 */
protected void fireArrow(ItemStack bow, World world, EntityLivingBase shooter, int charge) {
	if (!(shooter instanceof EntityPlayer)) return;

	final EntityPlayer player = (EntityPlayer) shooter;
	final boolean ammoRequired = isAmmoRequired(bow, player);
	IItemHandler ammoSlot = findAmmoSlot(player, is);

	charge = ForgeEventFactory.onArrowLoose(bow, world, player, charge, ammoSlot != null || !ammoRequired);
	if (charge < 0) return;

	if (ammoSlot != null || !ammoRequired) {
		if (ammoSlot == null) {
			ammoSlot = new ItemStackHandler(new ItemStack[]{new ItemStack(Items.arrow)});
		}

		final ItemStack ammo = ammoSlot.getStackInSlot(0);

		final float arrowVelocity = func_185059_b(charge);

		if (arrowVelocity >= 0.1) {
			final boolean consumeAmmo = ammoRequired && ammo.getItem() instanceof ItemArrow;

			if (!world.isRemote) {
				ItemArrow itemArrow = (ItemArrow) (ammo.getItem() instanceof ItemArrow ? ammo.getItem() : Items.arrow);
				EntityArrow entityArrow = itemArrow.makeTippedArrow(world, ammo, player);
				entityArrow.func_184547_a(player, player.rotationPitch, player.rotationYaw, 0.0F, arrowVelocity * 3.0F, 1.0F);

				if (arrowVelocity == 1.0f) {
					entityArrow.setIsCritical(true);
				}

				int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.power, bow);
				if (powerLevel > 0) {
					entityArrow.setDamage(entityArrow.getDamage() + (double) powerLevel * 0.5D + 0.5D);
				}

				int punchLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.punch, bow);
				if (punchLevel > 0) {
					entityArrow.setKnockbackStrength(punchLevel);
				}

				if (EnchantmentHelper.getEnchantmentLevel(Enchantments.flame, bow) > 0) {
					entityArrow.setFire(100);
				}

				bow.damageItem(1, player);

				if (!consumeAmmo) {
					entityArrow.canBePickedUp = EntityArrow.PickupStatus.CREATIVE_ONLY;
				}

				world.spawnEntityInWorld(entityArrow);
			}

			world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.entity_arrow_shoot, SoundCategory.NEUTRAL, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + arrowVelocity * 0.5F);

			if (consumeAmmo && ammoSlot.extractItem(0, 1, true) != null) {
				ammoSlot.extractItem(0, 1, false);
			}

			player.addStat(StatList.func_188057_b(this));
		}
	}
}

@Override
public void onPlayerStoppedUsing(ItemStack stack, World worldIn, EntityLivingBase entityLiving, int timeLeft) {
	int charge = this.getMaxItemUseDuration(stack) - timeLeft;
	fireArrow(stack, worldIn, entityLiving, charge);
}

@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) {
	return nockArrow(itemStackIn, worldIn, playerIn, hand);
}
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

So you moved all of your item registration into your ClientProxy.

 

Good job.  Now what does the server know about your items?

 

Jack shit is what.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I moved it a bunch of times from the main class and client proxy class, nothing is working on the server side what so ever, also it gives  that same error from the first time I posted

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Also, I got a question for Choonster, for the custom bow, I'm getting errors about the "this::isAmmo" references you are making. Intellij says that the current language level does not support this (I'm using the default one, which is 8 and I even tried 9 and it still gives me that error)

 

Method references were introduced in Java 8, so setting the language level to 8 should allow them. There is no

isAmmo

method in

ItemBow

, though; only

isArrow

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Here.. I did this and yes, I did try branches but it didn't work out right with my computer.

 

Main Class

package novaviper.tetracraft.main;

import net.minecraft.init.Items;
import net.minecraftforge.fml.common.*;
import net.minecraftforge.fml.common.Mod.*;
import net.minecraftforge.fml.common.event.*;
import novaviper.tetracraft.common.api.TetraCraftAPI;
import novaviper.tetracraft.common.config.ConfigHandler;
import novaviper.tetracraft.common.handler.PacketHandler;
import novaviper.tetracraft.common.lib.ModReference;
import novaviper.tetracraft.common.proxy.CommonProxy;

import java.io.File;

/**
* Created by NovaViper on 2/5/2016.
* Class Purpose: Main class for loading the mod
*/
@Mod(modid= ModReference.modid, name= ModReference.name, version= ModReference.version, useMetadata=ModReference.useMetadata, guiFactory=ModReference.guiFactory, updateJSON=ModReference.updateUrl, acceptedMinecraftVersions = ModReference.acceptedMC)
public class TetraCraft {
@Instance(value = ModReference.modid)
public static TetraCraft instance;

@SidedProxy(clientSide = ModReference.clientProxy, serverSide = ModReference.serverProxy)
public static CommonProxy proxy;

@EventHandler
public void preInt(FMLPreInitializationEvent event){
	ConfigHandler.init(event, new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + ModReference.name + File.separator + ModReference.modid + ".cfg"));
	ModCreativeTabs.load();
	ModItems.load();
	ModBlocks.load();
	ModCrafting.load();
	ModEntities.load();
	proxy.onPreInt(event);
}

@EventHandler
public void Int(FMLInitializationEvent event) {
	proxy.onInt(event);
	PacketHandler.registerPackets();
}

@EventHandler
public void postInt(FMLPostInitializationEvent event){
	proxy.onPostInt(event);
}

@EventHandler
public void serverInt(FMLServerStartedEvent event) {
	proxy.onServerStart(event);
}

@EventHandler
public void serverStop(FMLServerStoppedEvent event) {
	proxy.onServerStop(event);
}
}

 

Client Proxy

package novaviper.tetracraft.client.proxy;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import novaviper.tetracraft.client.lib.ModelJsonReference;
import novaviper.tetracraft.client.render.entity.RenderTerrakon;
import novaviper.tetracraft.common.entity.EntityTerrakon;
import novaviper.tetracraft.common.lib.ModReference;
import novaviper.tetracraft.common.lib.Registers;
import novaviper.tetracraft.common.proxy.CommonProxy;
import novaviper.tetracraft.main.*;

import static novaviper.tetracraft.main.ModBlocks.triaxOre;
import static novaviper.tetracraft.main.ModItems.ballisticBow;
import static novaviper.tetracraft.main.ModItems.triaxIngot;

/**
* Created by NovaViper on 2/6/2016.
* Class Purpose: Loads stuff on the client side
*/
public class ClientProxy extends CommonProxy {

// Client Objects\\
@Override
public void onPreInt(FMLPreInitializationEvent event){

	//Blocks
	//Registers.addBlockRender(broxStone, 0, ModReference.modid + ":stone_brox", "inventory");
	Registers.addBlockRender(triaxOre, 0, ModReference.modid + ":ore_triax", "inventory");
	//Items
	addItemRender(ballisticBow, 0, ModReference.modid + ":bow_ballistic", "inventory");
	addItemRender(triaxIngot, 0, ModReference.modid + ":ingot_triax", "inventory");

	addItemVariants(ballisticBow, ModelJsonReference.getBowStandbyModel("ballistic"),
			ModelJsonReference.getBowPullingModel("ballistic", "0"), ModelJsonReference.getBowPullingModel("ballistic", "1"),
			ModelJsonReference.getBowPullingModel("ballistic", "2"));

	ModEvents.load();
}

@Override
public void onInt(FMLInitializationEvent event){
	RenderManager renderManager = Minecraft.getMinecraft().getRenderManager();
	addEntityRender(EntityTerrakon.class, new RenderTerrakon(renderManager, 0.5F));
}

@Override
public void onPostInt(FMLPostInitializationEvent event){}

@Override
public void onServerStart(FMLServerStartedEvent event){}

@Override
public void onServerStop(FMLServerStoppedEvent event){}

// Client Objects\\
@Override
public EntityPlayer getPlayerEntity(MessageContext ctx) {
	return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer
			: super.getPlayerEntity(ctx));
}

@Override
public EntityPlayer getPlayerEntity() {
	return Minecraft.getMinecraft().thePlayer;
}

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
	/*if (ID == IDs.nileTableGUI) {
		TileEntity target = world.getTileEntity(new BlockPos(x, y, z));
		if (!(target instanceof TileEntityNileWorkbench)) {
			return null;
		}

		TileEntityNileWorkbench tileNileTable = (TileEntityNileWorkbench) target;
		GuiNileWorkbench tableGui = new GuiNileWorkbench(player.inventory, tileNileTable, world, new BlockPos(x, y, z));
		return tableGui;
	}*/
	return null;
}

/*@Override
public void spawnCrit(World world, Entity entity) {
	FMLClientHandler.instance().getClient().effectRenderer.emitParticleAtEntity(entity, EnumParticleTypes.CRIT);
}*/

//Client Registers NAV
public static void addKeyBinding(KeyBinding key) {
	ClientRegistry.registerKeyBinding(key);
}

public static void bindTileEntitySpecialRenderer(Class<? extends TileEntity> tileentity, TileEntitySpecialRenderer render) {
	ClientRegistry.bindTileEntitySpecialRenderer(tileentity, render);
}

public static void addEntityRender(Class entityClass, Render render) {
	RenderingRegistry.registerEntityRenderingHandler(entityClass, render);
}

public static void addItemRender(Item item, int metadata, String itemString, String location) {
	ModelLoader.setCustomModelResourceLocation(item, metadata, new ModelResourceLocation(itemString, location));
}

public static void addItemVariants(Item item, String... names) {
	ModelBakery.addVariantName(item, names);
}
}

 

I would switch the client stuff to the Int part, I would move around the loading like posted, in the client proxy. I am really lost on why nothing is loading correctly on the server. My previous mod had no issue with this whatsoever

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Also, I got a question for Choonster, for the custom bow, I'm getting errors about the "this::isAmmo" references you are making. Intellij says that the current language level does not support this (I'm using the default one, which is 8 and I even tried 9 and it still gives me that error)

 

Method references were introduced in Java 8, so setting the language level to 8 should allow them. There is no

isAmmo

method in

ItemBow

, though; only

isArrow

.

 

Im using isArrow, but I dont see that in the ItemBow and I'm using Java 8 with 8.77

 

UPDATE:

*Facepalm* I just found the setting to switch the build source settings on Intellij, but now the IDE says that isArrow cannot be found

 

UPDATE AGAIN:

I just found the method for isArrow but how do I convert all of those functions to readable methods?

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

UPDATE AGAIN:

I just found the method for isArrow but how do I convert all of those functions to readable methods?

 

Update your MCP mappings by setting the

minecraft.mappings

property in build.gradle, re-run

setupDecompWorkspace

and refresh your IDE project. The MCPBot website shows the mappings available for each version of Minecraft.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

UPDATE AGAIN:

I just found the method for isArrow but how do I convert all of those functions to readable methods?

 

Update your MCP mappings by setting the

minecraft.mappings

property in build.gradle, re-run

setupDecompWorkspace

and refresh your IDE project. The MCPBot website shows the mappings available for each version of Minecraft.

 

Thanks and also, my bow textures aren't loading with the code I put in from your mod

 

package novaviper.tetracraft.common.item;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.IItemPropertyGetter;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import novaviper.tetracraft.common.lib.ModReference;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Enchantments;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemArrow;
import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.items.wrapper.PlayerOffhandInvWrapper;
import net.minecraftforge.items.wrapper.RangedWrapper;

import java.util.function.Predicate;

/**
* Created by NovaViper on 2/6/2016.
* Class Purpose: Generic function class for the mod's bows
* Credit: Choonster For bow firing and boolean code!
*/
public class ItemModBow extends ItemBow {
public String bowType;

public ItemModBow(String unlocalizedName, CreativeTabs tab, String type, int maxUsage) {
	bowType = type;
	this.setUnlocalizedName(unlocalizedName);
	this.setCreativeTab(tab);
	this.setMaxDamage(maxUsage);

	// ItemBow's "pull" getter only works for Items.bow, so register a custom getter that works for any instance of this class.
	this.addPropertyOverride(new ResourceLocation(ModReference.modid, "pull"), new IItemPropertyGetter()
	{
		@SideOnly(Side.CLIENT)
		public float apply(ItemStack stack, World worldIn, EntityLivingBase entityIn)
		{
			if (entityIn == null){
				return 0.0f;
			}

			ItemStack activeItemStack = entityIn.getActiveItemStack();
			if (activeItemStack != null && activeItemStack.getItem() instanceof ItemModBow) {
				return (stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0f;
			}
			return 0.0f;
		}
	});
}

/**
 * Get an {@link IItemHandler} wrapper of the first slot in the player's inventory containing an {@link ItemStack} of ammunition.
 * <p>
 * This {@link IItemHandler} will always have a single slot containing the ammunition {@link ItemStack}.
 * <p>
 *
 * @param player The player
 * @param isAmmo A function that detects whether a given ItemStack is valid ammunition
 * @return The ammunition slot's IItemHandler, or null if there isn't any ammunition
 */
public static IItemHandler findAmmoSlot(EntityPlayer player, Predicate<ItemStack> isAmmo) {
	if (isAmmo.test(player.getHeldItemOffhand())) {
		return new PlayerOffhandInvWrapper(player.inventory);
	}

	// Vertical facing = main inventory
	final EnumFacing mainInventoryFacing = EnumFacing.UP;
	if (player.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, mainInventoryFacing)) {
		final IItemHandler mainInventory = player.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, mainInventoryFacing);

		if (isAmmo.test(player.getHeldItemMainhand())) {
			final int currentItem = player.inventory.currentItem;
			return new RangedWrapper((IItemHandlerModifiable) mainInventory, currentItem, currentItem + 1);
		}

		for (int slot = 0; slot < mainInventory.getSlots(); ++slot) {
			ItemStack itemStack = mainInventory.getStackInSlot(slot);

			if (isAmmo.test(itemStack)) {
				return new RangedWrapper((IItemHandlerModifiable) mainInventory, slot, slot + 1);
			}
		}
	}

	return null;
}

/**
 * Is ammunition required to fire this bow?
 *
 * @param bow     The bow
 * @param shooter The shooter
 * @return Is ammunition required?
 */
protected boolean isAmmoRequired(ItemStack bow, EntityPlayer shooter) {
	return !shooter.capabilities.isCreativeMode && EnchantmentHelper.getEnchantmentLevel(Enchantments.infinity, bow) == 0;
}

/**
 * Nock an arrow.
 *
 * @param bow     The bow ItemStack
 * @param shooter The player shooting the bow
 * @param world   The World
 * @param hand    The hand holding the bow
 * @return The result
 */
protected ActionResult<ItemStack> nockArrow(ItemStack bow, World world, EntityPlayer shooter, EnumHand hand) {
	boolean hasAmmo = findAmmoSlot(shooter, this::func_185058_h_) != null;

	ActionResult<ItemStack> ret = ForgeEventFactory.onArrowNock(bow, world, shooter, hand, hasAmmo);
	if (ret != null) return ret;

	if (isAmmoRequired(bow, shooter) && !hasAmmo) {
		return new ActionResult<>(EnumActionResult.FAIL, bow);
	} else {
		shooter.setActiveHand(hand);
		return new ActionResult<>(EnumActionResult.SUCCESS, bow);
	}
}

/**
 * Fire an arrow with the specified charge.
 *
 * @param bow     The bow ItemStack
 * @param world   The firing player's World
 * @param shooter The player firing the bow
 * @param charge  The charge of the arrow
 */
protected void fireArrow(ItemStack bow, World world, EntityLivingBase shooter, int charge) {
	if (!(shooter instanceof EntityPlayer)) return;

	final EntityPlayer player = (EntityPlayer) shooter;
	final boolean ammoRequired = isAmmoRequired(bow, player);
	IItemHandler ammoSlot = findAmmoSlot(player, this::func_185058_h_);

	charge = ForgeEventFactory.onArrowLoose(bow, world, player, charge, ammoSlot != null || !ammoRequired);
	if (charge < 0) return;

	if (ammoSlot != null || !ammoRequired) {
		if (ammoSlot == null) {
			ammoSlot = new ItemStackHandler(new ItemStack[]{new ItemStack(Items.arrow)});
		}

		final ItemStack ammo = ammoSlot.getStackInSlot(0);

		final float arrowVelocity = func_185059_b(charge);

		if (arrowVelocity >= 0.1) {
			final boolean consumeAmmo = ammoRequired && ammo.getItem() instanceof ItemArrow;

			if (!world.isRemote) {
				ItemArrow itemArrow = (ItemArrow) (ammo.getItem() instanceof ItemArrow ? ammo.getItem() : Items.arrow);
				EntityArrow entityArrow = itemArrow.makeTippedArrow(world, ammo, player);
				entityArrow.func_184547_a(player, player.rotationPitch, player.rotationYaw, 0.0F, arrowVelocity * 3.0F, 1.0F);

				if (arrowVelocity == 1.0f) {
					entityArrow.setIsCritical(true);
				}

				int powerLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.power, bow);
				if (powerLevel > 0) {
					entityArrow.setDamage(entityArrow.getDamage() + (double) powerLevel * 0.5D + 0.5D);
				}

				int punchLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.punch, bow);
				if (punchLevel > 0) {
					entityArrow.setKnockbackStrength(punchLevel);
				}

				if (EnchantmentHelper.getEnchantmentLevel(Enchantments.flame, bow) > 0) {
					entityArrow.setFire(100);
				}

				bow.damageItem(1, player);

				if (!consumeAmmo) {
					entityArrow.canBePickedUp = EntityArrow.PickupStatus.CREATIVE_ONLY;
				}

				world.spawnEntityInWorld(entityArrow);
			}

			world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.entity_arrow_shoot, SoundCategory.NEUTRAL, 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + arrowVelocity * 0.5F);

			if (consumeAmmo && ammoSlot.extractItem(0, 1, true) != null) {
				ammoSlot.extractItem(0, 1, false);
			}

			player.addStat(StatList.func_188057_b(this));
		}
	}
}

@Override
public void onPlayerStoppedUsing(ItemStack stack, World worldIn, EntityLivingBase entityLiving, int timeLeft) {
	int charge = this.getMaxItemUseDuration(stack) - timeLeft;
	fireArrow(stack, worldIn, entityLiving, charge);
}

@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) {
	return nockArrow(itemStackIn, worldIn, playerIn, hand);
}
}

 

package novaviper.tetracraft.common.item;

import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import novaviper.tetracraft.client.lib.ModelJsonReference;

/**
* Created by NovaViper on 2/12/2016.
* Class Purpose:
*/
public class ItemContinousBow extends ItemModBow{
int fireRate;

public ItemContinousBow(String unlocalizedName, CreativeTabs tab, String type, int maxUsage, int fireRate) {
	super(unlocalizedName, tab, type, maxUsage);
	this.fireRate = fireRate;
}

@Override
public int getMaxItemUseDuration(ItemStack stack) {
	return 10;
}

@Override
public void onPlayerStoppedUsing(ItemStack stack, World worldIn, EntityLivingBase entityLiving, int timeLeft) {
	int charge = (getMaxItemUseDuration(stack) - timeLeft) * fireRate;
	fireArrow(stack, worldIn, entityLiving, charge);
}

@Override
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) {
	int charge = getMaxItemUseDuration(stack) * fireRate;
	fireArrow(stack, worldIn, entityLiving, charge);

	return stack;
}
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

Thanks and also, my bow textures aren't loading with the code I put in from your mod

 

Have you updated your models to use the new override system? You can see my bow's new model here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Hey Choonster, could you help me fix this error in 1.8? It's relating with the server.

1.8 Source code is on Github

 

"C:\Program Files\Java\jdk1.8.0_77\bin\java" -Didea.launcher.port=7537 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_77\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_77\jre\lib\rt.jar;C:\Users\NovaPC\Dropbox\MinecraftMods\TetraCraft\1.8\build\classes\production\1.8_main;C:\Users\NovaPC\.gradle\caches\minecraft\deobfedDeps\compileDummy.jar;C:\Users\NovaPC\.gradle\caches\minecraft\deobfedDeps\providedDummy.jar;C:\Users\NovaPC\.gradle\caches\minecraft\net\minecraftforge\forge\1.8-11.14.4.1577\snapshot\20141130\forgeSrc-1.8-11.14.4.1577.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.minecraft\launchwrapper\1.12\111e7bea9c968cdb3d06ef4632bf7ff0824d0f36\launchwrapper-1.12.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-debug-all\5.0.3\f9e364ae2a66ce2a543012a4668856e84e5dab74\asm-debug-all-5.0.3.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.typesafe.akka\akka-actor_2.11\2.3.3\ed62e9fc709ca0f2ff1a3220daa8b70a2870078e\akka-actor_2.11-2.3.3.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.typesafe\config\1.2.1\f771f71fdae3df231bcd54d5ca2d57f0bf93f467\config-1.2.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-actors-migration_2.11\1.1.0\dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f\scala-actors-migration_2.11-1.1.0.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-compiler\2.11.1\56ea2e6c025e0821f28d73ca271218b8dd04926a\scala-compiler-2.11.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang.plugins\scala-continuations-library_2.11\1.0.2\e517c53a7e9acd6b1668c5a35eccbaa3bab9aac\scala-continuations-library_2.11-1.0.2.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang.plugins\scala-continuations-plugin_2.11.1\1.0.2\f361a3283452c57fa30c1ee69448995de23c60f7\scala-continuations-plugin_2.11.1-1.0.2.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-library\2.11.1\e11da23da3eabab9f4777b9220e60d44c1aab6a\scala-library-2.11.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang.modules\scala-parser-combinators_2.11\1.0.1\f05d7345bf5a58924f2837c6c1f4d73a938e1ff0\scala-parser-combinators_2.11-1.0.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-reflect\2.11.1\6580347e61cc7f8e802941e7fde40fa83b8badeb\scala-reflect-2.11.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang.modules\scala-swing_2.11\1.0.1\b1cdd92bd47b1e1837139c1c53020e86bb9112ae\scala-swing_2.11-1.0.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang.modules\scala-xml_2.11\1.0.2\820fbca7e524b530fdadc594c39d49a21ea0337e\scala-xml_2.11-1.0.2.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\lzma\lzma\0.0.1\521616dc7487b42bef0e803bd2fa3faf668101d7\lzma-0.0.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\java3d\vecmath\1.5.2\79846ba34cbd89e2422d74d53752f993dcc2ccaf\vecmath-1.5.2.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.sf.trove4j\trove4j\3.0.3\42ccaf4761f0dfdfa805c9e340d99a755907e2dd\trove4j-3.0.3.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.ibm.icu\icu4j-core-mojang\51.2\63d216a9311cca6be337c1e458e587f99d382b84\icu4j-core-mojang-51.2.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.sf.jopt-simple\jopt-simple\4.6\306816fb57cf94f108a43c95731b08934dcae15c\jopt-simple-4.6.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.paulscode\codecjorbis\20101023\c73b5636faf089d9f00e8732a829577de25237ee\codecjorbis-20101023.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.paulscode\codecwav\20101023\12f031cfe88fef5c1dd36c563c0a3a69bd7261da\codecwav-20101023.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.paulscode\libraryjavasound\20101123\5c5e304366f75f9eaa2e8cca546a1fb6109348b3\libraryjavasound-20101123.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.paulscode\librarylwjglopenal\20100824\73e80d0794c39665aec3f62eee88ca91676674ef\librarylwjglopenal-20100824.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.paulscode\soundsystem\20120107\419c05fe9be71f792b2d76cfc9b67f1ed0fec7f6\soundsystem-20120107.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\io.netty\netty-all\4.0.15.Final\85cad5eb4fc8ae2ecc990dc7c411771a091ded5\netty-all-4.0.15.Final.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\17.0\9c6ef172e8de35fd8d4d8783e4821e57cdef7445\guava-17.0.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-lang3\3.3.2\90a3822c38ec8c996e84c16a3477ef632cbc87a3\commons-lang3-3.3.2.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\commons-io\commons-io\2.4\b1b6ea3b7e4aa4f492509a4952029cd8e48019ad\commons-io-2.4.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\commons-codec\commons-codec\1.9\9ce04e34240f674bc72680f8b843b1457383161a\commons-codec-1.9.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput\2.0.5\39c7796b469a600f72380316f6b1f11db6c2c7c4\jinput-2.0.5.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.java.jutils\jutils\1.0.0\e12fe1fda814bd348c1579329c86943d2cd3c6a6\jutils-1.0.0.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.2.4\a60a5e993c98c864010053cb901b7eab25306568\gson-2.2.4.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.mojang\authlib\1.5.17\893a8c553c0cfc9b6fbdff023747e30152ab09ec\authlib-1.5.17.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.mojang\realms\1.6.1\5655f6fb44aece10e5b3ad7cfee3e6936031c068\realms-1.6.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.apache.commons\commons-compress\1.8.1\a698750c16740fd5b3871425f4cb3bbaa87f529d\commons-compress-1.8.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpclient\4.3.3\18f4247ff4572a074444572cee34647c43e7c9c7\httpclient-4.3.3.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\commons-logging\commons-logging\1.1.3\f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f\commons-logging-1.1.3.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.apache.httpcomponents\httpcore\4.3.2\31fbbff1ddbf98f3aa7377c94d33b0447c646b6e\httpcore-4.3.2.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.0-beta9\1dd66e68cccd907880229f9e2de1314bd13ff785\log4j-api-2.0-beta9.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-core\2.0-beta9\678861ba1b2e1fccb594bb0ca03114bb05da9695\log4j-core-2.0-beta9.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl\2.9.1\f58c5aabcef0e41718a564be9f8e412fff8db847\lwjgl-2.9.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl_util\2.9.1\290d7ba8a1bd9566f5ddf16ad06f09af5ec9b20e\lwjgl_util-2.9.1.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\tv.twitch\twitch\6.5\320a2dfd18513a5f41b4e75729df684488cbd925\twitch-6.5.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.scala-lang\scala-actors\2.11.0\8ccfb6541de179bb1c4d45cf414acee069b7f78b\scala-actors-2.11.0.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\7ff832a6eb9ab6a767f1ade2b548092d0fa64795\jinput-platform-2.0.5-natives-linux.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\385ee093e01f587f30ee1c8a2ee7d408fd732e16\jinput-platform-2.0.5-natives-windows.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput-platform\2.0.5\53f9c919f34d2ca9de8c51fc4e1e8282029a9232\jinput-platform-2.0.5-natives-osx.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\tv.twitch\twitch-platform\6.5\206c4ccaecdbcfd2a1631150c69a97bbc9c20c11\twitch-platform-6.5-natives-windows-32.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\tv.twitch\twitch-platform\6.5\9fdd0fd5aed0817063dcf95b69349a171f447ebd\twitch-platform-6.5-natives-windows-64.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\tv.twitch\twitch-platform\6.5\5f9d1ee26257b3a33f0ca06fed335ef462af659f\twitch-platform-6.5-natives-osx.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\tv.twitch\twitch-external-platform\4.5\18215140f010c05b9f86ef6f0f8871954d2ccebf\twitch-external-platform-4.5-natives-windows-32.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\tv.twitch\twitch-external-platform\4.5\c3cde57891b935d41b6680a9c5e1502eeab76d86\twitch-external-platform-4.5-natives-windows-64.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.1\4c517eca808522457dd95ee8fc1fbcdbb602efbe\lwjgl-platform-2.9.1-natives-windows.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.1\aa9aae879af8eb378e22cfc64db56ec2ca9a44d1\lwjgl-platform-2.9.1-natives-linux.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\org.lwjgl.lwjgl\lwjgl-platform\2.9.1\2d12c83fdfbc04ecabf02c7bc8cc54d034f0daac\lwjgl-platform-2.9.1-natives-osx.jar;C:\Users\NovaPC\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\2.0.1\516c03b21d50a644d538de0f0369c620989cd8f0\jsr305-2.0.1.jar;C:\Users\NovaPC\.gradle\caches\minecraft\net\minecraftforge\forge\1.8-11.14.4.1577\start;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain GradleStartServer
[20:38:14] [main/INFO] [GradleStart]: Extra: []
[20:38:14] [main/INFO] [GradleStart]: Running with arguments: [--tweakClass, net.minecraftforge.fml.common.launcher.FMLServerTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[20:38:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[20:38:15] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[20:38:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[20:38:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker
[20:38:15] [main/INFO] [FML]: Forge Mod Loader version 11.14.4.1577 for Minecraft 1.8 loading
[20:38:15] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_77, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jdk1.8.0_77\jre
[20:38:15] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[20:38:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[20:38:16] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[20:38:16] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[20:38:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:38:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[20:38:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[20:38:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:38:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:38:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[20:38:18] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[20:38:38] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[20:38:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[20:38:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[20:38:42] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[20:38:42] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[20:38:42] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[20:38:43] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.server.MinecraftServer}
[20:39:12] [server thread/INFO]: Starting minecraft server version 1.8
[20:39:13] [server thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[20:39:13] [server thread/INFO] [FML]: MinecraftForge v11.14.4.1577 Initialized
[20:39:13] [server thread/INFO] [FML]: Replaced 204 ore recipies
[20:39:14] [server thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[20:39:15] [server thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[20:39:15] [server thread/INFO] [FML]: Searching C:\Users\NovaPC\Dropbox\MinecraftMods\TetraCraft\1.8\run\mods for mods
[20:39:46] [server thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[20:39:48] [server thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tetracraft] at CLIENT
[20:39:48] [server thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, tetracraft] at SERVER
[20:39:53] [server thread/INFO] [FML]: Processing ObjectHolder annotations
[20:39:53] [server thread/INFO] [FML]: Found 384 ObjectHolder annotations
[20:39:53] [server thread/INFO] [FML]: Identifying ItemStackHolder annotations
[20:39:53] [server thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[20:39:54] [server thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[20:39:55] [Forge Version Check/INFO] [ForgeVersionCheck]: [tetracraft] Starting version check at https://raw.githubusercontent.com/NovaViper/TetraCraft/master/update.json
[20:39:55] [server thread/INFO] [FML]: Applying holder lookups
[20:39:55] [server thread/INFO] [FML]: Holder lookups applied
[20:39:55] [server thread/INFO] [FML]: Injecting itemstacks
[20:39:55] [server thread/INFO] [FML]: Itemstack injection complete
[20:39:55] [server thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
[20:39:55] [server thread/ERROR] [FML]: 
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCH	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
UCH	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.4.1577.jar) 
UCH	Forge{11.14.4.1577} [Minecraft Forge] (forgeSrc-1.8-11.14.4.1577.jar) 
UCE	tetracraft{0.0.1} [TetraCraft] (1.8_main) 
[20:39:55] [server thread/ERROR] [FML]: The following problems were captured during this phase
[20:39:55] [server thread/ERROR] [FML]: Caught exception from tetracraft
java.lang.NoClassDefFoundError: net/minecraft/client/renderer/block/statemap/IStateMapper
at novaviper.tetracraft.main.ModItems.load(ModItems.java:22) ~[1.8_main/:?]
at novaviper.tetracraft.main.TetraCraft.preInt(TetraCraft.java:31) ~[1.8_main/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:553) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550) [Loader.class:?]
at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88) [FMLServerHandler.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355) [FMLCommonHandler.class:?]
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:120) [DedicatedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:500) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77]
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.block.statemap.IStateMapper
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_77]
... 34 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@654d8173 from coremod FMLCorePlugin
at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:234) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_77]
... 34 more
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/block/statemap/IStateMapper for invalid side SERVER
at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:49) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:230) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_77]
... 34 more
[20:39:55] [server thread/ERROR]: Encountered an unexpected exception
net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/block/statemap/IStateMapper

at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:163) ~[LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:553) ~[Loader.class:?]
at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:88) ~[FMLServerHandler.class:?]
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:355) ~[FMLCommonHandler.class:?]
at net.minecraft.server.dedicated.DedicatedServer.startServer(DedicatedServer.java:120) ~[DedicatedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:500) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77]
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/renderer/block/statemap/IStateMapper
at novaviper.tetracraft.main.ModItems.load(ModItems.java:22) ~[1.8_main/:?]
at novaviper.tetracraft.main.TetraCraft.preInt(TetraCraft.java:31) ~[1.8_main/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:553) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550) ~[Loader.class:?]
... 5 more
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.block.statemap.IStateMapper
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_77]
at novaviper.tetracraft.main.ModItems.load(ModItems.java:22) ~[1.8_main/:?]
at novaviper.tetracraft.main.TetraCraft.preInt(TetraCraft.java:31) ~[1.8_main/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:553) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550) ~[Loader.class:?]
... 5 more
Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@654d8173 from coremod FMLCorePlugin
at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:234) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_77]
at novaviper.tetracraft.main.ModItems.load(ModItems.java:22) ~[1.8_main/:?]
at novaviper.tetracraft.main.TetraCraft.preInt(TetraCraft.java:31) ~[1.8_main/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:553) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550) ~[Loader.class:?]
... 5 more
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/renderer/block/statemap/IStateMapper for invalid side SERVER
at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:49) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:230) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) ~[launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ~[launchwrapper-1.12.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_77]
at novaviper.tetracraft.main.ModItems.load(ModItems.java:22) ~[1.8_main/:?]
at novaviper.tetracraft.main.TetraCraft.preInt(TetraCraft.java:31) ~[1.8_main/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:553) ~[forgeSrc-1.8-11.14.4.1577.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[LoadController.class:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[LoadController.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) ~[LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550) ~[Loader.class:?]
... 5 more
[20:39:55] [server thread/ERROR]: This crash report has been saved to: C:\Users\NovaPC\Dropbox\MinecraftMods\TetraCraft\1.8\run\.\crash-reports\crash-2016-04-10_20.39.55-server.txt
[20:40:01] [Forge Version Check/INFO] [ForgeVersionCheck]: [tetracraft] Found status: UP_TO_DATE Target: null
[20:40:01] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[20:40:02] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: AHEAD Target: null
Exception in thread "AWT-EventQueue-0" [20:43:19] [server thread/WARN] [FML]: Can't revert to frozen GameData state without freezing first.
[20:43:19] [server thread/INFO] [FML]: Applying holder lookups
[20:43:19] [server thread/INFO] [FML]: Holder lookups applied
[20:43:19] [server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED. Errors may have been discarded.
[20:43:19] [server thread/INFO] [FML]: The state engine was in incorrect state ERRORED and forced into state AVAILABLE. Errors may have been discarded.
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: net.minecraftforge.fml.relauncher.FMLSecurityManager$ExitTrappedException
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraftforge.fml.common.asm.transformers.TerminalTransformer$ExitVisitor.checkAccess(TerminalTransformer.java:142)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraftforge.fml.common.asm.transformers.TerminalTransformer$ExitVisitor.systemExitCalled(TerminalTransformer.java:112)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.server.gui.MinecraftServerGui$1.windowClosing(MinecraftServerGui.java:82)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.Window.processWindowEvent(Window.java:2058)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at javax.swing.JFrame.processWindowEvent(JFrame.java:305)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.Window.processEvent(Window.java:2017)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.Component.dispatchEventImpl(Component.java:4891)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.Container.dispatchEventImpl(Container.java:2294)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.Window.dispatchEventImpl(Window.java:2750)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.Component.dispatchEvent(Component.java:4713)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.EventQueue.access$500(EventQueue.java:97)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.EventQueue$3.run(EventQueue.java:709)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.EventQueue$3.run(EventQueue.java:703)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.security.AccessController.doPrivileged(Native Method)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.EventQueue$4.run(EventQueue.java:731)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.awt.EventQueue$4.run(EventQueue.java:729)
[20:43:20] [AWT-EventQueue-0/INFO] [sTDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.security.AccessController.doPrivileged(Native Method)

Process finished with exit code 0

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

It's trying to load the client-only interface

IStateMapper

on the server when you call

Registers.addItem

because another method of

Registers

references

IStateMapper

.

 

This is exactly the same error as diesieben07 was talking about earlier in the thread: you need to separate your client-only code from your common code (the proper solution) or mark client-only methods with

@SideOnly(Side.CLIENT)

(a quick fix).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

What Choonster said, and also clean up your imports:

import novaviper.tetracraft.common.item.*;
import novaviper.tetracraft.common.lib.*;
import novaviper.tetracraft.client.lib.*;

That's in your ModItems class - well, guess what? Your ModItems class is common to both server and client, but you are including client.lib.* - if any of those classes are @SideOnly(Side.CLIENT), they will not exist on the server but will still try to load.

 

If you are using Eclipse, press Ctrl-Shift-O to auto-import only the classes that you actually use, rather than using the wildcard import.

Link to comment
Share on other sites

What Choonster said, and also clean up your imports:

import novaviper.tetracraft.common.item.*;
import novaviper.tetracraft.common.lib.*;
import novaviper.tetracraft.client.lib.*;

That's in your ModItems class - well, guess what? Your ModItems class is common to both server and client, but you are including client.lib.* - if any of those classes are @SideOnly(Side.CLIENT), they will not exist on the server but will still try to load.

 

If you are using Eclipse, press Ctrl-Shift-O to auto-import only the classes that you actually use, rather than using the wildcard import.

 

Although I agree that the imports should be cleaned up, imported classes aren't actually loaded at runtime unless they're referenced in the code itself. Importing a client-only class won't crash the server, using it outside of client-only code will.

 

In IDEA (which I believe the OP is using), Ctrl-Alt-O optimises imports. I also make heavy use of Ctrl-Alt-L to reformat the current class, which also optimises imports.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

import lines, by the way, aren't actually compiled.  You can import all the packages you want, it doesn't matter.

 

What imports do is tell the compiler where to find a given class that is being used (and those references are compiled).  Imports are essentially syntactic sugar.  You only have to type

import System; Object somevar;

, but what actually gets compiled is

System.Object somevar;

.  So

import some.package.not.being.used;

gets stripped.

 

So what happens when a class is loaded by the JVM is that the JVM needs to verify that every other class reference made by the loaded one can be retrieved and loaded as well, as it needs to insure that every call being made by the class being loaded is a valid action.  This is why if you do any coremodding and alter a class, but make it try to reference a class or object that doesn't exist (e.g. a typo) the game will crash: it attempted to validate the modified class and was unable to locate the reference (I did this on accident once).

 

(As an aside, the

throws

declaration isn't compiled at all and the JVM doesn't care until the error is actually thrown and nothing in the call stack handles it.)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share




×
×
  • Create New...

Important Information

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