Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

lukas2005

Forge Modder
  • Joined

Everything posted by lukas2005

  1. This is still true because your main class is still loaded on the server, it still contains a reference to client-side only code, which will still be located in order for the JVM to validate your class. This will still crash the dedicated server. How?? i am using sided proxy tutorial from forge's readthedocs page and BTW i not started modding today and i know something arelady about forge
  2. i am calling the registerRender() in client side proxy
  3. i updated topic with code
  4. Yay now it works topic to close
  5. i need to call these methods inside NBTserialize and NBT deserialize methods? but i need to obtain an instance of IPlayerData.Storage somehow
  6. ok so were i need to use them and how?
  7. But how do i do that? i have these read/write NBT methods in my capability storage class i need to call them or something?
  8. it gives me effects now but don't saves
  9. now my code looks like this: package pl.minepack.gym.capabilities; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import pl.minepack.gym.network.ModNetwork; import pl.minepack.gym.network.PlayerDataMessage; public interface IPlayerData { public int addStrength(int count); public int subStrength(int count); public int setStrength(int count); public int getStrength(); public static class Storage implements Capability.IStorage<IPlayerData> { @Override public NBTBase writeNBT(Capability<IPlayerData> capability, IPlayerData instance, EnumFacing side) { NBTTagCompound nbt = new NBTTagCompound(); nbt.setInteger("Strength", instance.getStrength()); return nbt; } @Override public void readNBT(Capability<IPlayerData> capability, IPlayerData instance, EnumFacing side, NBTBase nbt) { instance.setStrength(((NBTTagCompound)nbt).getInteger("Strength")); } } public static class DefaultImpl implements IPlayerData { private int Strength = 0; private EntityPlayer p; DefaultImpl(EntityPlayer p) { this.p = p; } @Override public int addStrength(int count) { return setStrength(getStrength() + count); } @Override public int subStrength(int count) { return setStrength(getStrength() - count); } @Override public int setStrength(int count) { if (!p.getEntityWorld().isRemote) { ModNetwork.INSTANCE.sendTo(new PlayerDataMessage(count), (EntityPlayerMP) p); } return this.Strength = count; } @Override public int getStrength() { return this.Strength; } } public static class Provider implements ICapabilitySerializable { private DefaultImpl Impl; public Provider(EntityPlayer p) { Impl = new DefaultImpl(p); } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if (capability == ModCapabilities.PLAYER_DATA_CAP) return true; return false; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return (T) Impl; } @Override public NBTBase serializeNBT() { NBTBase nbt = new NBTTagCompound(); return nbt; } @Override public void deserializeNBT(NBTBase nbt) { } } } and it still returns null in 53 line of PlayerDataMessage: package pl.minepack.gym.network; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.IThreadListener; import net.minecraft.world.WorldServer; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import pl.minepack.gym.Reference; import pl.minepack.gym.capabilities.IPlayerData; import pl.minepack.gym.capabilities.ModCapabilities; import pl.minepack.minelib.utils.utils; public class PlayerDataMessage implements IMessage { private int Strength = 0; // A default constructor is always required public PlayerDataMessage(){} public PlayerDataMessage(int Strength) { this.Strength = Strength; } @Override public void toBytes(ByteBuf buf) { buf.writeInt(Strength); } @Override public void fromBytes(ByteBuf buf) { // Reads the int back from the buf. Note that if you have multiple values, you must read in the same order you wrote. Strength = buf.readInt(); } // The params of the IMessageHandler are <REQ, REPLY> // This means that the first param is the packet you are receiving, and the second is the packet you are returning. // The returned packet can be used as a "response" from a sent packet. public static class PlayerDataMessageHandler implements IMessageHandler<PlayerDataMessage, IMessage> { // Do note that the default constructor is required, but implicitly defined in this case @Override public IMessage onMessage(PlayerDataMessage message, MessageContext ctx) { EntityPlayer p = utils.getPlayerInstance(ctx); IPlayerData d = p.getCapability(ModCapabilities.PLAYER_DATA_CAP, null); //Here d.setStrength(message.Strength); utils.Println(d.getStrength() + " : " + p.getName().toString(), Reference.NAME); // No response packet return null; } } }
  10. This won't work. While this will somewhat work, it is not very useful. Creating a new capability instance every time means it will not persist in any way, ever. but what shloud i do in these 2 places??
  11. IPlayerData: package pl.minepack.gym.capabilities; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import pl.minepack.gym.network.ModNetwork; import pl.minepack.gym.network.PlayerDataMessage; public interface IPlayerData { public int addStrength(int count); public int subStrength(int count); public int setStrength(int count); public int getStrength(); public static class Storage implements Capability.IStorage<IPlayerData> { @Override public NBTBase writeNBT(Capability<IPlayerData> capability, IPlayerData instance, EnumFacing side) { NBTTagCompound nbt = new NBTTagCompound(); nbt.setInteger("Strength", instance.getStrength()); return nbt; } @Override public void readNBT(Capability<IPlayerData> capability, IPlayerData instance, EnumFacing side, NBTBase nbt) { instance.setStrength(((NBTTagCompound)nbt).getInteger("Strength")); } } public static class DefaultImpl implements IPlayerData { private int Strength = 0; private EntityPlayer p; DefaultImpl(EntityPlayer p) { this.p = p; } @Override public int addStrength(int count) { return setStrength(getStrength() + count); } @Override public int subStrength(int count) { return setStrength(getStrength() - count); } @Override public int setStrength(int count) { if (!p.getEntityWorld().isRemote) { ModNetwork.INSTANCE.sendTo(new PlayerDataMessage(count), (EntityPlayerMP) p); } return this.Strength = count; } @Override public int getStrength() { return this.Strength; } } public static class Provider implements ICapabilitySerializable { private EntityPlayer p; public Provider(EntityPlayer p) { this.p = p; } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if (capability instanceof IPlayerData) return true; return false; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return (T) new DefaultImpl(p); } @Override public NBTBase serializeNBT() { NBTBase nbt = new NBTTagCompound(); return nbt; } @Override public void deserializeNBT(NBTBase nbt) { } } } ModCapabilities: public class ModCapabilities { @CapabilityInject(IPlayerData.class) public static Capability<IPlayerData> PLAYER_DATA_CAP = null; public static void main() { CapabilityManager.INSTANCE.register(IPlayerData.class, new IPlayerData.Storage(), IPlayerData.DefaultImpl.class); } } ModNetwork: public class ModNetwork { public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MODID); public static void main() { register(); } public static void register() { INSTANCE.registerMessage(PlayerDataMessageHandler.class, PlayerDataMessage.class, 0, Side.CLIENT); } } AttachCapabilityEvent: @SubscribeEvent public void attachCap(AttachCapabilitiesEvent.Entity e) { if (e.getEntity() instanceof EntityPlayer) { //EntityPlayer player = (EntityPlayer) e.getEntity(); e.addCapability(new ResourceLocation(Reference.MODID, "PlayerData"), new IPlayerData.Provider((EntityPlayer) e.getEntity())); } } and i think thats all stuff related to this topic
  12. i want to make a enity that players can move around by just pushing it. with a Model and texture of mob/player who died i tried some ways but my entity don't appears in the game. i tried to make something like just standing steve for start but i have egg of my entity but it does not do anything code: ModEnities: package pl.minepack.warzone.entity; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelBiped; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry; import pl.minepack.minelib.utils.utils; import pl.minepack.warzone.Reference; import pl.minepack.warzone.WarZone; public class ModEntities { public static void main() { register(); } static void register() { //utils.registerEntity(RagdollEntity.class, "Ragdoll", 1, WarZone.modInstance); EntityRegistry.registerModEntity(RagdollEntity.class, "Ragdoll", 100, WarZone.modInstance, 100, 1, true, 12, 11); } public static void registerRender() { RenderingRegistry.registerEntityRenderingHandler(RagdollEntity.class, new RenderRagdoll(Minecraft.getMinecraft().getRenderManager(), new ModelBiped(), 2, new ResourceLocation(Reference.MODID, "/entity/steve.png"))); } } EntitiyRagdoll: package pl.minepack.warzone.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumHandSide; import net.minecraft.world.World; public class RagdollEntity extends EntityLiving { private EnumHandSide primaryHand = EnumHandSide.RIGHT; private Entity entityDied; public RagdollEntity(World worldIn, Entity entityDied) { super(worldIn); this.entityDied = entityDied; } @Override public Iterable<ItemStack> getArmorInventoryList() { return null; } @Override public ItemStack getItemStackFromSlot(EntityEquipmentSlot slotIn) { return null; } @Override public void setItemStackToSlot(EntityEquipmentSlot slotIn, ItemStack stack) { } @Override public EnumHandSide getPrimaryHand() { return primaryHand; } @Override public boolean canBreatheUnderwater() { return true; } } RenderRagdoll: package pl.minepack.warzone.entity; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; public class RenderRagdoll extends RenderLiving<RagdollEntity> { private ResourceLocation t; public RenderRagdoll(RenderManager rendermanagerIn, ModelBase modelbaseIn, float shadowsizeIn, ResourceLocation t) { super(rendermanagerIn, modelbaseIn, shadowsizeIn); this.t = t; } @Override protected ResourceLocation getEntityTexture(RagdollEntity entity) { return t; } } ClientProxy: package pl.minepack.warzone.proxy; import pl.minepack.warzone.entity.ModEntities; public class ClientProxy implements IProxy { @Override public void init() { ModEntities.registerRender(); } }
  13. PlayerDataMessage: package pl.minepack.gym.network; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import pl.minepack.gym.Reference; import pl.minepack.gym.capabilities.IPlayerData; import pl.minepack.gym.capabilities.ModCapabilities; import pl.minepack.minelib.utils.utils; public class PlayerDataMessage implements IMessage { private int Strength = 0; // A default constructor is always required public PlayerDataMessage(){} public PlayerDataMessage(int Strength) { this.Strength = Strength; } @Override public void toBytes(ByteBuf buf) { buf.writeInt(Strength); } @Override public void fromBytes(ByteBuf buf) { // Reads the int back from the buf. Note that if you have multiple values, you must read in the same order you wrote. Strength = buf.readInt(); } // The params of the IMessageHandler are <REQ, REPLY> // This means that the first param is the packet you are receiving, and the second is the packet you are returning. // The returned packet can be used as a "response" from a sent packet. public static class PlayerDataMessageHandler implements IMessageHandler<PlayerDataMessage, IMessage> { // Do note that the default constructor is required, but implicitly defined in this case @Override public IMessage onMessage(PlayerDataMessage message, MessageContext ctx) { EntityPlayer p = utils.getPlayerInstance(ctx); IPlayerData d = p.getCapability(ModCapabilities.PLAYER_DATA_CAP, null); int Strength = message.Strength; d.setStrength(Strength); utils.Println(d.getStrength() + " : " + p.getName().toString(), Reference.NAME); // No response packet return null; } } } utils#getPlayerInstance(): public static EntityPlayer getPlayerInstance(MessageContext ctx) { return (ctx.side.isClient() ? Minecraft.getMinecraft().thePlayer : ctx.getServerHandler().playerEntity); } EDIT: For some reason this code stopped working: log: EDIT 2: It says that the IPlayerData d = p.getCapability(ModCapabilities.PLAYER_DATA_CAP, null); returned null but why?
  14. ok i read the jabelar's Coding Tutorial (http://jabelarminecraft.blogspot.com/p/minecraft-forge.html) and now it lemts me to enter the world but it still doesnt give me a potion effect
  15. now my PlayerDataMessage looks like this: package pl.minepack.gym.network; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import pl.minepack.gym.Reference; import pl.minepack.gym.capabilities.IPlayerData; import pl.minepack.gym.capabilities.ModCapabilities; import pl.minepack.minelib.utils.utils; public class PlayerDataMessage implements IMessage { private int Strength = 0; private EntityPlayer p; // A default constructor is always required public PlayerDataMessage(){} public PlayerDataMessage(int Strength, EntityPlayer p) { this.Strength = Strength; this.p = p; } @Override public void toBytes(ByteBuf buf) { buf.writeInt(Strength); } @Override public void fromBytes(ByteBuf buf) { // Reads the int back from the buf. Note that if you have multiple values, you must read in the same order you wrote. Strength = buf.readInt(); } // The params of the IMessageHandler are <REQ, REPLY> // This means that the first param is the packet you are receiving, and the second is the packet you are returning. // The returned packet can be used as a "response" from a sent packet. public static class PlayerDataMessageHandler implements IMessageHandler<PlayerDataMessage, IMessage> { // Do note that the default constructor is required, but implicitly defined in this case @Override public IMessage onMessage(PlayerDataMessage message, MessageContext ctx) { EntityPlayer p = message.p; IPlayerData d = p.getCapability(ModCapabilities.PLAYER_DATA_CAP, null); int Strength = message.Strength; d.setStrength(Strength); utils.Println(d.getStrength() + " : " + p.getName().toString(), Reference.NAME); // No response packet return null; } } } so it do't uses these server methods and the error is the same
  16. this is in my PlayerDataMessage class package pl.minepack.gym.network; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.IThreadListener; import net.minecraft.world.WorldServer; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import pl.minepack.gym.Reference; import pl.minepack.gym.capabilities.IPlayerData; import pl.minepack.gym.capabilities.ModCapabilities; import pl.minepack.minelib.utils.utils; public class PlayerDataMessage implements IMessage { private int Strength = 0; // A default constructor is always required public PlayerDataMessage(){} public PlayerDataMessage(int Strength) { this.Strength = Strength; } @Override public void toBytes(ByteBuf buf) { buf.writeInt(Strength); } @Override public void fromBytes(ByteBuf buf) { // Reads the int back from the buf. Note that if you have multiple values, you must read in the same order you wrote. Strength = buf.readInt(); } // The params of the IMessageHandler are <REQ, REPLY> // This means that the first param is the packet you are receiving, and the second is the packet you are returning. // The returned packet can be used as a "response" from a sent packet. public static class PlayerDataMessageHandler implements IMessageHandler<PlayerDataMessage, IMessage> { // Do note that the default constructor is required, but implicitly defined in this case @Override public IMessage onMessage(PlayerDataMessage message, MessageContext ctx) { final EntityPlayer p = ctx.getServerHandler().playerEntity;//ctx.getClientHandler does not have the #playerEntity field IThreadListener mainThread = (WorldServer) p.worldObj; final IPlayerData d = p.getCapability(ModCapabilities.PLAYER_DATA_CAP, null); final int Strength = message.Strength; mainThread.addScheduledTask(new Runnable() { @Override public void run() { d.setStrength(Strength); utils.Println(d.getStrength() + " : " + p.getName().toString(), Reference.NAME); } }); // No response packet return null; } } }
  17. now when i join the world it is on the loading screen and nothing happens log: IPlayerData: package pl.minepack.gym.capabilities; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import pl.minepack.gym.network.NetworkManager; import pl.minepack.gym.network.PlayerDataMessage; public interface IPlayerData { public int addStrength(int count); public int subStrength(int count); public int setStrength(int count); public int getStrength(); public static class Storage implements Capability.IStorage<IPlayerData> { @Override public NBTBase writeNBT(Capability<IPlayerData> capability, IPlayerData instance, EnumFacing side) { NBTTagCompound nbt = new NBTTagCompound(); nbt.setInteger("Strength", instance.getStrength()); return nbt; } @Override public void readNBT(Capability<IPlayerData> capability, IPlayerData instance, EnumFacing side, NBTBase nbt) { instance.setStrength(((NBTTagCompound)nbt).getInteger("Strength")); } } public static class DefaultImpl implements IPlayerData { private int Strength = 0; private EntityPlayer p; DefaultImpl(EntityPlayer p) { this.p = p; } @Override public int addStrength(int count) { return setStrength(getStrength() + count); } @Override public int subStrength(int count) { return setStrength(getStrength() - count); } @Override public int setStrength(int count) { if (!p.getEntityWorld().isRemote) { NetworkManager.INSTANCE.sendTo(new PlayerDataMessage(count), (EntityPlayerMP) p); } return this.Strength = count; } @Override public int getStrength() { return this.Strength; } } public static class Provider implements ICapabilitySerializable { private EntityPlayer p; public Provider(EntityPlayer p) { this.p = p; } @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if (capability instanceof IPlayerData) return true; return false; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return (T) new DefaultImpl(p); } @Override public NBTBase serializeNBT() { NBTBase nbt = new NBTTagCompound(); return nbt; } @Override public void deserializeNBT(NBTBase nbt) { } } } AttachCapabilityEnvent: @SubscribeEvent public void attachCap(AttachCapabilitiesEvent.Entity e) { if (e.getEntity() instanceof EntityPlayer) { //EntityPlayer player = (EntityPlayer) e.getEntity(); e.addCapability(new ResourceLocation(Reference.MODID, "IPlayerData"), new IPlayerData.Provider((EntityPlayer) e.getEntity())); } }
  18. Shloud i cast EnityPlayer to EntityPlayerMP ?
  19. i added a constructor that takes an EntityPlayer as argument inside a default impl of my capability and now i need to insert something in my implementation of ICapabilitySerializable: public static class Provider implements ICapabilitySerializable { @Override public boolean hasCapability(Capability<?> capability, EnumFacing facing) { if (capability instanceof IPlayerData) return true; return false; } @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { return (T) new DefaultImpl(); // Right here } @Override public NBTBase serializeNBT() { NBTBase nbt = new NBTTagCompound(); return nbt; } @Override public void deserializeNBT(NBTBase nbt) { } } and DefaultImpl: public static class DefaultImpl implements IPlayerData { private int Strength = 0; private EntityPlayerMP p; DefaultImpl(EntityPlayerMP p) { this.p = p; } @Override public int addStrength(int count) { return setStrength(getStrength() + count); } @Override public int subStrength(int count) { return setStrength(getStrength() - count); } @Override public int setStrength(int count) { NetworkManager.INSTANCE.sendTo(new PlayerDataMessage(count), p); return this.Strength = count; } @Override public int getStrength() { return this.Strength; } } or i am doing something wrong?
  20. but now how do i get the player from provider?
  21. i think he meant that if you place the furnance on top of his block then furnance will be infinetly powered PS Ja też z polski
  22. do you mean this: final EntityPlayerMP p = ctx.getServerHandler().playerEntity;? if yes then i alerady know this and fixed it how do i get the player instance inside the default impl of capablity?
  23. i changed in sending packet from sendToServer to sendToAll and in register changed side to Side.CLIENT and now game crashes: 2016-09-20 17:24:51,598 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-09-20 17:24:51,601 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [17:24:51] [main/INFO] [GradleStart]: username: [email protected] [17:24:51] [main/INFO] [GradleStart]: Extra: [] [17:24:51] [main/INFO] [GradleStart]: Password found, attempting login [17:24:51] [main/INFO]: Logging in with username & password [17:24:52] [main/INFO] [GradleStart]: Login Succesful! [17:24:52] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, [{"name":"preferredLanguage","value":"en"},{"name":"twitch_access_token","value":"09emc4rwc7gr6saqfv8d33k7jxhi69"}], --assetsDir, C:/Users/Łukasz/.gradle/caches/minecraft/assets, --assetIndex, 1.10, --userType, mojang, --accessToken{REDACTED}, --version, 1.10.2, --uuid, e149942f201f48db9f25b34056b86aa9, --username, lukas20056, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [17:24:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [17:24:52] [main/INFO] [FML]: Forge Mod Loader version 12.18.1.2042 for Minecraft 1.10.2 loading [17:24:52] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_102, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_102 [17:24:52] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [17:24:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [17:24:52] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [17:24:52] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [17:24:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [17:24:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [17:24:53] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [17:24:55] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [17:24:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [17:24:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [17:24:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker 2016-09-20 17:24:57,972 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-09-20 17:24:58,061 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-09-20 17:24:58,065 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [17:24:58] [main/INFO] [GradleStart]: Remapping AccessTransformer rules... [17:24:58] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [17:24:58] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [17:24:58] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [17:25:00] [Client thread/INFO]: Setting user: lukas20056 [17:25:06] [Client thread/WARN]: Skipping bad option: lastServer: [17:25:06] [Client thread/INFO]: LWJGL Version: 2.9.4 [17:25:08] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:221]: ---- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 20.09.16 17:25 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.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_102, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 840293992 bytes (801 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 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 369.09' Renderer: 'GeForce GTX 750 Ti/PCIe/SSE2' [17:25:09] [Client thread/INFO] [FML]: MinecraftForge v12.18.1.2042 Initialized [17:25:09] [Client thread/INFO] [FML]: Replaced 233 ore recipes [17:25:09] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [17:25:09] [Client thread/INFO] [FML]: Searching D:\Programy\Deweloping\Projekty\eclipse\Java\Mod Making\Gym-Mod\run\mods for mods [17:25:12] [Client thread/WARN] [FML]: **************************************** [17:25:12] [Client thread/WARN] [FML]: * The modid Baubles is not the same as it's lowercase version. Lowercasing will be enforced in 1.11 [17:25:12] [Client thread/WARN] [FML]: * at net.minecraftforge.fml.common.FMLModContainer.sanityCheckModId(FMLModContainer.java:141) [17:25:12] [Client thread/WARN] [FML]: * at net.minecraftforge.fml.common.FMLModContainer.<init>(FMLModContainer.java:126) [17:25:12] [Client thread/WARN] [FML]: * at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [17:25:12] [Client thread/WARN] [FML]: * at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [17:25:12] [Client thread/WARN] [FML]: * at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [17:25:12] [Client thread/WARN] [FML]: * at java.lang.reflect.Constructor.newInstance(Unknown Source)... [17:25:12] [Client thread/WARN] [FML]: **************************************** [17:25:12] [Client thread/INFO] [FML]: Forge Mod Loader has identified 6 mods to load [17:25:13] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, gym, minelib, Baubles] at CLIENT [17:25:13] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, gym, minelib, Baubles] at SERVER [17:25:14] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Gym Mod, FMLFileResourcePack:Mine Lib, FMLFileResourcePack:Baubles [17:25:14] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [17:25:14] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations [17:25:14] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [17:25:14] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [17:25:14] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [17:25:14] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [17:25:14] [Client thread/INFO] [sTDOUT]: [pl.minepack.minelib.utils.utils:Println:40]: [Gym Mod] Pre Init [17:25:14] [Client thread/INFO] [sTDOUT]: [pl.minepack.minelib.utils.utils:Println:40]: [Mine Lib] Pre Init [17:25:14] [Client thread/INFO] [FML]: Applying holder lookups [17:25:14] [Client thread/INFO] [FML]: Holder lookups applied [17:25:14] [Client thread/INFO] [FML]: Injecting itemstacks [17:25:14] [Client thread/INFO] [FML]: Itemstack injection complete [17:25:14] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: OUTDATED Target: 12.18.1.2092 [17:25:20] [sound Library Loader/INFO]: Starting up SoundSystem... [17:25:21] [Thread-8/INFO]: Initializing LWJGL OpenAL [17:25:21] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:25:21] [Thread-8/INFO]: OpenAL initialized. [17:25:21] [sound Library Loader/INFO]: Sound engine started [17:25:29] [Client thread/INFO] [FML]: Max texture size: 16384 [17:25:29] [Client thread/INFO]: Created: 16x16 textures-atlas [17:25:31] [Client thread/INFO] [sTDOUT]: [pl.minepack.minelib.utils.utils:Println:40]: [Gym Mod] Init [17:25:31] [Client thread/INFO] [sTDOUT]: [pl.minepack.minelib.utils.utils:Println:40]: [Mine Lib] Init [17:25:31] [Client thread/INFO] [FML]: Injecting itemstacks [17:25:31] [Client thread/INFO] [FML]: Itemstack injection complete [17:25:31] [Client thread/INFO] [sTDOUT]: [pl.minepack.minelib.utils.utils:Println:40]: [Gym Mod] Post Init [17:25:31] [Client thread/INFO] [sTDOUT]: [pl.minepack.minelib.utils.utils:Println:40]: [Mine Lib] Post Init [17:25:31] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 6 mods [17:25:31] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Gym Mod, FMLFileResourcePack:Mine Lib, FMLFileResourcePack:Baubles [17:25:37] [Client thread/INFO]: SoundSystem shutting down... [17:25:37] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [17:25:37] [sound Library Loader/INFO]: Starting up SoundSystem... [17:25:37] [Thread-10/INFO]: Initializing LWJGL OpenAL [17:25:37] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:25:37] [Thread-10/INFO]: OpenAL initialized. [17:25:37] [sound Library Loader/INFO]: Sound engine started [17:25:43] [Client thread/INFO] [FML]: Max texture size: 16384 [17:25:43] [Client thread/INFO]: Created: 1024x512 textures-atlas [17:25:45] [Client thread/WARN]: Skipping bad option: lastServer: [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found. [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: DOMAIN blocks/blocks/gym [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------------------------------- [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: domain blocks/blocks/gym is missing 1 texture [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: domain blocks/blocks/gym is missing a resource manager - it is probably a side-effect of automatic texture processing [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: ------------------------- [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: The missing resources for domain blocks/blocks/gym are: [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: textures/particle/ParticleSztanga.png [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: ------------------------- [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: No other errors exist for domain blocks/blocks/gym [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [17:25:45] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= [17:25:49] [server thread/INFO]: Starting integrated minecraft server version 1.10.2 [17:25:49] [server thread/INFO]: Generating keypair [17:25:49] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance [17:25:49] [server thread/INFO] [FML]: Applying holder lookups [17:25:49] [server thread/INFO] [FML]: Holder lookups applied [17:25:49] [server thread/INFO] [FML]: Loading dimension 0 (Test) (net.minecraft.server.integrated.IntegratedServer@375465d6) [17:25:50] [server thread/INFO] [FML]: Loading dimension 1 (Test) (net.minecraft.server.integrated.IntegratedServer@375465d6) [17:25:50] [server thread/INFO] [FML]: Loading dimension -1 (Test) (net.minecraft.server.integrated.IntegratedServer@375465d6) [17:25:50] [server thread/INFO]: Preparing start region for level 0 [17:25:51] [server thread/INFO]: Preparing spawn area: 2% [17:25:52] [server thread/INFO]: Preparing spawn area: 78% [17:25:52] [server thread/INFO]: Changing view distance to 12, from 10 [17:25:54] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2 [17:25:54] [Netty Server IO #1/INFO] [FML]: Client protocol version 2 [17:25:54] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 6 mods : [email protected],[email protected],[email protected],[email protected],[email protected],[email protected] [17:25:54] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [17:25:54] [server thread/INFO] [FML]: [server thread] Server side modded connection established [17:25:54] [server thread/INFO]: lukas20056[local:E:39fa245f] logged in with entity id 205 at (57.33064243597522, 92.5625, 56.51571660147242) [17:25:54] [server thread/INFO]: lukas20056 joined the game [17:25:59] [Netty Local Client IO #0/ERROR] [FML]: SimpleChannelHandlerWrapper exception java.lang.ClassCastException: net.minecraft.client.network.NetHandlerPlayClient cannot be cast to net.minecraft.network.NetHandlerPlayServer at net.minecraftforge.fml.common.network.simpleimpl.MessageContext.getServerHandler(MessageContext.java:55) ~[MessageContext.class:?] at pl.minepack.gym.network.PlayerDataMessage$PlayerDataMessageHandler.onMessage(PlayerDataMessage.java:52) ~[PlayerDataMessage$PlayerDataMessageHandler.class:?] at pl.minepack.gym.network.PlayerDataMessage$PlayerDataMessageHandler.onMessage(PlayerDataMessage.java:1) ~[PlayerDataMessage$PlayerDataMessageHandler.class:?] at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:56) ~[simpleChannelHandlerWrapper.class:?] at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:36) ~[simpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[simpleChannelInboundHandler.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:4.0.23.Final] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [DefaultChannelPipeline.class:4.0.23.Final] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:4.0.23.Final] at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:109) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:156) [NetworkManager.class:?] at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:51) [NetworkManager.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [simpleChannelInboundHandler.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:410) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:276) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:73) [NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [simpleChannelInboundHandler.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [DefaultChannelPipeline.class:4.0.23.Final] at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:326) [LocalChannel.class:4.0.23.Final] at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:45) [LocalChannel.class:4.0.23.Final] at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:312) [LocalChannel$5.class:4.0.23.Final] at io.netty.channel.local.LocalEventLoop.run(LocalEventLoop.java:33) [LocalEventLoop.class:4.0.23.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final] at java.lang.Thread.run(Unknown Source) [?:1.8.0_102] [17:25:59] [Netty Local Client IO #0/ERROR] [FML]: There was a critical exception handling a packet on channel gym java.lang.ClassCastException: net.minecraft.client.network.NetHandlerPlayClient cannot be cast to net.minecraft.network.NetHandlerPlayServer at net.minecraftforge.fml.common.network.simpleimpl.MessageContext.getServerHandler(MessageContext.java:55) ~[MessageContext.class:?] at pl.minepack.gym.network.PlayerDataMessage$PlayerDataMessageHandler.onMessage(PlayerDataMessage.java:52) ~[PlayerDataMessage$PlayerDataMessageHandler.class:?] at pl.minepack.gym.network.PlayerDataMessage$PlayerDataMessageHandler.onMessage(PlayerDataMessage.java:1) ~[PlayerDataMessage$PlayerDataMessageHandler.class:?] at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:56) ~[simpleChannelHandlerWrapper.class:?] at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:36) ~[simpleChannelHandlerWrapper.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[simpleChannelInboundHandler.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) ~[AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) ~[AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:4.0.23.Final] at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) ~[AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) ~[AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) ~[DefaultChannelPipeline.class:4.0.23.Final] at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:4.0.23.Final] at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:109) [FMLProxyPacket.class:?] at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:156) [NetworkManager.class:?] at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:51) [NetworkManager.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [simpleChannelInboundHandler.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:410) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:276) [NetworkDispatcher.class:?] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:73) [NetworkDispatcher.class:?] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [simpleChannelInboundHandler.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319) [AbstractChannelHandlerContext.class:4.0.23.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) [DefaultChannelPipeline.class:4.0.23.Final] at io.netty.channel.local.LocalChannel.finishPeerRead(LocalChannel.java:326) [LocalChannel.class:4.0.23.Final] at io.netty.channel.local.LocalChannel.access$400(LocalChannel.java:45) [LocalChannel.class:4.0.23.Final] at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:312) [LocalChannel$5.class:4.0.23.Final] at io.netty.channel.local.LocalEventLoop.run(LocalEventLoop.java:33) [LocalEventLoop.class:4.0.23.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final] at java.lang.Thread.run(Unknown Source) [?:1.8.0_102] [17:25:59] [server thread/INFO]: Saving and pausing game... [17:25:59] [server thread/INFO]: Saving chunks for level 'Test'/Overworld [17:25:59] [server thread/INFO]: Saving chunks for level 'Test'/Nether [17:25:59] [server thread/INFO]: Saving chunks for level 'Test'/The End [17:26:00] [server thread/INFO]: lukas20056 lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}} [17:26:00] [server thread/INFO]: lukas20056 left the game [17:26:00] [server thread/INFO]: Stopping singleplayer server as player logged out [17:26:00] [server thread/INFO]: Stopping server [17:26:00] [server thread/INFO]: Saving players [17:26:00] [server thread/INFO]: Saving worlds [17:26:00] [server thread/INFO]: Saving chunks for level 'Test'/Overworld [17:26:00] [server thread/INFO]: Saving chunks for level 'Test'/Nether [17:26:00] [server thread/INFO]: Saving chunks for level 'Test'/The End [17:26:02] [server thread/INFO] [FML]: Unloading dimension 0 [17:26:02] [server thread/INFO] [FML]: Unloading dimension -1 [17:26:02] [server thread/INFO] [FML]: Unloading dimension 1 [17:26:02] [server thread/INFO] [FML]: Applying holder lookups [17:26:02] [server thread/INFO] [FML]: Holder lookups applied [17:26:06] [Client thread/INFO]: Stopping! [17:26:06] [Client thread/INFO]: SoundSystem shutting down... [17:26:06] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
  24. i tried to save somthing into this cap i created ModCapabilites.java: public class ModCapabilities { @CapabilityInject(IPlayerData.class) public static Capability<IPlayerData> PLAYER_DATA_CAP = null; public static void main() { CapabilityManager.INSTANCE.register(IPlayerData.class, new IPlayerData.Storage(), IPlayerData.DefaultImpl.class); } } and in EntityJoinWorldEvent i have called if (e.getEntity() instanceof EntityPlayer) EntityPlayer p = (EntityPlayer) e.getEntity(); IPlayerData d = p.getCapability(ModCapabilities.PLAYER_DATA_CAP, null); d.setStrength(100) but it dont gives me potions so i tried to implement client-server communication PlayerDataMessage: package pl.minepack.gym.network; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.IThreadListener; import net.minecraft.world.WorldServer; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; import pl.minepack.gym.Reference; import pl.minepack.gym.capabilities.IPlayerData; import pl.minepack.gym.capabilities.ModCapabilities; import pl.minepack.minelib.utils.utils; public class PlayerDataMessage implements IMessage { private int Strength = 0; // A default constructor is always required public PlayerDataMessage(){} public PlayerDataMessage(int Strength) { this.Strength = Strength; } @Override public void toBytes(ByteBuf buf) { buf.writeInt(Strength); } @Override public void fromBytes(ByteBuf buf) { // Reads the int back from the buf. Note that if you have multiple values, you must read in the same order you wrote. Strength = buf.readInt(); } // The params of the IMessageHandler are <REQ, REPLY> // This means that the first param is the packet you are receiving, and the second is the packet you are returning. // The returned packet can be used as a "response" from a sent packet. public static class PlayerDataMessageHandler implements IMessageHandler<PlayerDataMessage, IMessage> { // Do note that the default constructor is required, but implicitly defined in this case @Override public IMessage onMessage(PlayerDataMessage message, MessageContext ctx) { final EntityPlayerMP p = ctx.getServerHandler().playerEntity; IThreadListener mainThread = (WorldServer) p.worldObj; final IPlayerData d = p.getCapability(ModCapabilities.PLAYER_DATA_CAP, null); final int Strength = message.Strength; mainThread.addScheduledTask(new Runnable() { @Override public void run() { d.setStrength(Strength); utils.Println(d.getStrength() + " : " + p.getName().toString(), Reference.NAME); } }); // No response packet return null; } } } and it is registered like this:INSTANCE.registerMessage(PlayerDataMessageHandler.class, PlayerDataMessage.class, 0, Side.SERVER); and i am sending an update packet each time that my Strength field is modified using custom functions but it still dont works

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.