IamMaxim
Members-
Posts
56 -
Joined
-
Last visited
Converted
-
Gender
Male
-
Location
Russia
IamMaxim's Achievements
Stone Miner (3/8)
1
Reputation
-
[SOLVED] [1.10.2] TESR inventory rendering problem
IamMaxim replied to IamMaxim's topic in Modder Support
Fixed it. I had a lot of other errors related to JSON files, and forge simply skipped others (including block_chest_01 errors). I fixed these errors and block_chest_01 error appeared, then I fixed it. -
[SOLVED] [1.10.2] TESR inventory rendering problem
IamMaxim replied to IamMaxim's topic in Modder Support
No, I tried search and found nothing. Log: -
[SOLVED] [1.10.2] TESR inventory rendering problem
IamMaxim replied to IamMaxim's topic in Modder Support
Here's my registration in init https://github.com/IamMaxim/galedwell/blob/5c7af146cb1631c684a32361f377c6925c458a2b/src/main/java/ru/iammaxim/tesitems/Proxy/ClientProxy.java#L51. Here's how it looks in game (it uses copy-pasted vanilla chest renderer for now) -
[SOLVED] [1.10.2] TESR inventory rendering problem
IamMaxim replied to IamMaxim's topic in Modder Support
I already tried it, this doesn't work. I tried to register in preInit, init and postInit. -
You can send client's HP on connect and process damage on both server and client side, or send updated HP to client when damaged/healed. For last mob's HP bar you can create a field in capability and assign HP to it in attack event (and sync, too). Also, on client side track last attacked entity and save it to capability/variable too. Then, when you render entity, check if renderingEntity == lastAttackedEntity, and if it's true, render HP bar above it.
-
I made a TileEntity and renderer for it. It renders fine in world, but in inventory and in hand it's just block with missing texture. I tried to find a way to fix it on forums, but not succeeded. I believe I miss renderer registration or do it in wrong place. Can you point me at mistake? Here's my block: https://github.com/IamMaxim/galedwell/blob/89d5eee59ebd5b07d78eb0ff83bffd17e55cb19b/src/main/java/ru/iammaxim/tesitems/Blocks/BlockChest.java Tile entity https://github.com/IamMaxim/galedwell/blob/89d5eee59ebd5b07d78eb0ff83bffd17e55cb19b/src/main/java/ru/iammaxim/tesitems/Blocks/BlockChestTileEntity.java TESR https://github.com/IamMaxim/galedwell/blob/89d5eee59ebd5b07d78eb0ff83bffd17e55cb19b/src/main/java/ru/iammaxim/tesitems/Blocks/BlockChestTileEntityRenderer.java TESR registration: here https://github.com/IamMaxim/galedwell/blob/89d5eee59ebd5b07d78eb0ff83bffd17e55cb19b/src/main/java/ru/iammaxim/tesitems/Blocks/mBlocks.java#L41 and here https://github.com/IamMaxim/galedwell/blob/89d5eee59ebd5b07d78eb0ff83bffd17e55cb19b/src/main/java/ru/iammaxim/tesitems/Proxy/ClientProxy.java#L37 I tried moving initModels to init event (from preInit), but this hasn't helped. No info about missing model variants appear (i tried search)
-
I have this problem: [21:28:27] [server thread/INFO] [sTDOUT]: [ru.iammaxim.tesitems.TESItems:onEntityLoad:297]: trying to attach capability to 214 [21:28:27] [server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.AttachCapabilitiesEvent$Entity@2a9f08e: java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_101] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:1.8.0_101] at java.lang.Class.getConstructor0(Class.java:3075) ~[?:1.8.0_101] at java.lang.Class.newInstance(Class.java:412) ~[?:1.8.0_101] at net.minecraftforge.common.capabilities.CapabilityManager$1.call(CapabilityManager.java:64) ~[CapabilityManager$1.class:?] at net.minecraftforge.common.capabilities.Capability.getDefaultInstance(Capability.java:124) ~[Capability.class:?] at ru.iammaxim.tesitems.Player.PlayerAttributesCapabilityProvider.<init>(PlayerAttributesCapabilityProvider.java:13) ~[PlayerAttributesCapabilityProvider.class:?] at ru.iammaxim.tesitems.TESItems.onEntityLoad(TESItems.java:298) ~[TESItems.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_TESItems_onEntityLoad_AttachCapabilitiesEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) [EventBus.class:?] at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:565) [ForgeEventFactory.class:?] at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:550) [ForgeEventFactory.class:?] at net.minecraft.entity.Entity.<init>(Entity.java:252) [Entity.class:?] at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:192) [EntityLivingBase.class:?] at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:181) [EntityPlayer.class:?] at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:162) [EntityPlayerMP.class:?] at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:525) [PlayerList.class:?] at net.minecraft.server.network.NetHandlerLoginServer.tryAcceptPlayer(NetHandlerLoginServer.java:137) [NetHandlerLoginServer.class:?] at net.minecraft.server.network.NetHandlerLoginServer.update(NetHandlerLoginServer.java:64) [NetHandlerLoginServer.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:308) [NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:195) [NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:806) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:408) [DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityPlayerSP at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101] ... 27 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@17d2ed1b from coremod FMLCorePlugin at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:253) ~[forgeSrc-1.10.2-12.18.2.2123.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_101] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101] ... 27 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/entity/EntityPlayerSP for invalid side SERVER at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:56) ~[forgeSrc-1.10.2-12.18.2.2123.jar:?] at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:249) ~[forgeSrc-1.10.2-12.18.2.2123.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_101] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101] ... 27 more [21:28:27] [server thread/ERROR] [FML]: Index: 1 Listeners: [21:28:27] [server thread/ERROR] [FML]: 0: NORMAL [21:28:27] [server thread/ERROR] [FML]: 1: ASM: ru.iammaxim.tesitems.TESItems@3285c689 onEntityLoad(Lnet/minecraftforge/event/AttachCapabilitiesEvent;)V [21:28:27] [server thread/ERROR]: Encountered an unexpected exception java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityPlayerSP at java.lang.Class.getDeclaredConstructors0(Native Method) ~[?:1.8.0_101] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[?:1.8.0_101] at java.lang.Class.getConstructor0(Class.java:3075) ~[?:1.8.0_101] at java.lang.Class.newInstance(Class.java:412) ~[?:1.8.0_101] at net.minecraftforge.common.capabilities.CapabilityManager$1.call(CapabilityManager.java:64) ~[CapabilityManager$1.class:?] at net.minecraftforge.common.capabilities.Capability.getDefaultInstance(Capability.java:124) ~[Capability.class:?] at ru.iammaxim.tesitems.Player.PlayerAttributesCapabilityProvider.<init>(PlayerAttributesCapabilityProvider.java:13) ~[PlayerAttributesCapabilityProvider.class:?] at ru.iammaxim.tesitems.TESItems.onEntityLoad(TESItems.java:298) ~[TESItems.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_TESItems_onEntityLoad_AttachCapabilitiesEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:185) ~[EventBus.class:?] at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:565) ~[ForgeEventFactory.class:?] at net.minecraftforge.event.ForgeEventFactory.gatherCapabilities(ForgeEventFactory.java:550) ~[ForgeEventFactory.class:?] at net.minecraft.entity.Entity.<init>(Entity.java:252) ~[Entity.class:?] at net.minecraft.entity.EntityLivingBase.<init>(EntityLivingBase.java:192) ~[EntityLivingBase.class:?] at net.minecraft.entity.player.EntityPlayer.<init>(EntityPlayer.java:181) ~[EntityPlayer.class:?] at net.minecraft.entity.player.EntityPlayerMP.<init>(EntityPlayerMP.java:162) ~[EntityPlayerMP.class:?] at net.minecraft.server.management.PlayerList.createPlayerForUser(PlayerList.java:525) ~[PlayerList.class:?] at net.minecraft.server.network.NetHandlerLoginServer.tryAcceptPlayer(NetHandlerLoginServer.java:137) ~[NetHandlerLoginServer.class:?] at net.minecraft.server.network.NetHandlerLoginServer.update(NetHandlerLoginServer.java:64) ~[NetHandlerLoginServer.class:?] at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:308) ~[NetworkManager.class:?] at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:195) ~[NetworkSystem.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:806) ~[MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:408) ~[DedicatedServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityPlayerSP at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_101] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101] ... 27 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@17d2ed1b from coremod FMLCorePlugin at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:253) ~[forgeSrc-1.10.2-12.18.2.2123.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_101] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101] ... 27 more Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/entity/EntityPlayerSP for invalid side SERVER at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:56) ~[forgeSrc-1.10.2-12.18.2.2123.jar:?] at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:249) ~[forgeSrc-1.10.2-12.18.2.2123.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_101] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_101] ... 27 more [21:28:27] [server thread/ERROR]: This crash report has been saved to: /home/maxim/Galedwell/run/./crash-reports/crash-2016-11-12_21.28.27-server.txt on latest Forge build on server, but I even don't have EntityPlayerSP in my imports and methods (I tried search and found nothing). Here are my: Main mod file: https://github.com/IamMaxim/galedwell/blob/1.10.2/src/main/java/ru/iammaxim/tesitems/TESItems.java Exception is thrown in https://github.com/IamMaxim/galedwell/blob/1.10.2/src/main/java/ru/iammaxim/tesitems/Player/PlayerAttributesCapabilityProvider.java when i try to getDefaultInstance() of https://github.com/IamMaxim/galedwell/blob/1.10.2/src/main/java/ru/iammaxim/tesitems/Player/IPlayerAttributesCapability.java In singleplayer all works as it should. I tried it on 1.9.4 and got the same result. Can you point me at problem?
-
Thanks, I just forgot about thread safety, now it's ok
-
There's another problem now. Minecraft#thePlayer here is null: @Override public IMessage onMessage(AttributesMessage message, MessageContext ctx) { System.out.println("got message"); EntityPlayer player = Minecraft.getMinecraft().thePlayer; if (player == null) System.out.println("player == null"); IPlayerAttributesCapability cap = player.getCapability(TESItems.attributesCapability, null); for (String s : TESItems.ATTRIBUTES) { System.out.println("Adding " + s + " to player"); cap.setAttribute(s, message.getAttribute(s)); } return null; }
-
No, it's still null. Here's my code: @SubscribeEvent public void onEntityJoinWorld(EntityJoinWorldEvent event) { IPlayerAttributesCapability cap = event.getEntity().getCapability(TESItems.attributesCapability, null); if (cap == null) System.out.println("cap == null"); networkWrapper.sendTo(new AttributesMessage(cap.getAttributes()), (EntityPlayerMP) event.getEntity()); }
-
How should I send data from server to client on player login? I am trying to do this: public void onEntityLoad(AttachCapabilitiesEvent.Entity event) { if (event.getEntity() instanceof EntityPlayer) { event.addCapability(new ResourceLocation(TESItems.attributesTagName), new PlayerAttributesCapabilityProvider()); IPlayerAttributesCapability cap = event.getEntity().getCapability(TESItems.attributesCapability, null); networkWrapper.sendTo(new AttributesMessage(cap.getAttributes()), (EntityPlayerMP) event.getEntity()); System.out.println("onEntityLoad(" + event.getEntity().getDisplayName() + ")"); } , but I get cap == null. Where should I send my packet? Capability works fine on server side, I already used it.
-
[1.7.10] Modded server crash on startup
IamMaxim replied to ChivalryGod's topic in Support & Bug Reports
Did you accepted EULA? -
Can you please give me simple capability example code with saving variable (float, for example)? I searched for code examples, but couldn't understand it completely.
-
Create class for command: public class Command extends CommandBase { @Override public String getCommandName() { return "commandName"; } @Override public String getCommandUsage(ICommandSender sender) { return "commandUsage"; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { //Do what you want } } Register in main mod file: @EventHandler public void serverStarting(FMLServerStartingEvent event) { event.registerServerCommand(new Command()); }
-
No, I don't want to run it in IDE, I want to just make it work for now. So I need to search any other coremods and find info there only?