-
Posts
2638 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Ernio
-
Well, I guess nothing to worry about (just annoying fact that is happens only client or only server side). The problem with solution proposed is the fact that it happens after attack is done. It is logically weird to code it this way: Entity attacks -> Apply attack on target -> go back to attacker -> count again -> change damage. I know that it WILL cause issues in my future coding (since it might not be possible to always go back to attacker), so got to re-design "alot". I will probably handle Player separately (like 1st post describes) since it's a very unique entity. Thanks.
-
WHOOP onAttack(LivingAttackEvent event) [17:06:29] [server thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:52] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:52] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:52] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:52] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:52] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:52] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:52] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:53] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:53] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:53] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:53] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:53] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:53] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:53] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:54] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:55] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:56] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:57] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:58] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:09:59] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Zombie inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Bat inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall [17:10:00] [Client thread/INFO] [sTDOUT]: [.ForgeEvents:onAttack:52]: Squid inWall I am lost as to - what are reasons of those? I mean - my guess is probably failed mob spawn location (inWall), but why does is happen mostly on client, and why 1st log (1st on I posted) happened on server (it's not only one).
-
Damn, I actually did miss it. Not really what I expected (#rewrite), but will do nice since it goes before almost everything - only Player's AttackEntityEvent fires first, even knockback can be nicely altered here Thx.
-
My actions go like this: 1. Attack (swing) -> 2. Check if hit (miss % of attacker) -> 3. Check dodge (dodge % of target) -> 4. Hit (knockback) -> 5. Check if block (shield system - target's) -> 6. Modify damage taken by blocking factors (target's) -> 7. Land damage on target -> 8. Apply armour factors -> 9. Do final damage (lower target's health). Now - all that is easy peasy for EntityPlayer attacks - there is nice AttackEntityEvent that allows to do 1,2,3,4,5,6; then event.target.attackEntityFrom to do 7, and finally LivingHurtEvent to do 8 and 9. Now with other entities (mobs) it's kinda harder. While 7,8,9 are easy (same as above), the 1-6 are not - there is no event "EntityAttackEntityEvent", since those actions are handled by AI. Question arises: What is correct way to hook into moment when ANY (vanilla too) entityLiving performs EntityLivingBase#attackEntityAsMob(Entity target). I was looking deeply in those codes and might missed something easy, but if not - only thing that comes to mind is to replace attackAI when mob joins world with extending class that will be my hook for 1-6 operations. Is this only way?
-
Since like forever people been doing this kind of thing where "you are not allowed to use this item". Now - everytime it was done (that I know of) the way was to use PlayerTickEvent or Item#onUpdate() and check if item is current item and if so - move it to other slot, because "you can't use it". Question arises - is there other more "right now" way when executing code (changing the current slot). Whenever, whoever makes some IInventory - it's clear and you can use isItemValid or some other stuff, you can't really do that in vanilla. Is there a hook somewhere? I can deal with ticks, but just asking for yes or no (or something else?). EDIT By "right now" I ment that you don't use tick-checks, which would avoid e.g constatly checking NBT or other stuff.
-
[1.7.10] Packet onMessage Null Pointer Exception
Ernio replied to Izzy Axel's topic in Modder Support
I am kinda trying to figure out what is the problem. I don't really see what stops you from performing pushes. If your TileEntity is setup correctly then it should be the same for all players - no matter if reloged or not. That fact measn that you can push on both server and client (more smooth effect). Forgive me for not understanding problem here ;c -
Container, Gui? If you are using those - GuiHandler would be also nice. You need to actually setup some packeting (synchro). You use markDirty(), but where is synchro code?
-
Your cat code: (fix it) @Override public void writeEntityToNBT(NBTTagCompound nbt) { super.readEntityFromNBT(nbt); If everything else is right, this should fix saving. As to health: Why are you saving all those values (about health)? this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(newHealth + (healthMultiplier * 2)); Error is most likely "healthMultiplier * 2" but idk what you want to archieve, it's more of a "debug it yourself". :C If you have github I could find exact error.
-
[Solved][1.7.10]Code for mod is not working, please help!
Ernio replied to Caleb6801's topic in Modder Support
world.isRemote - client !world.isRemote - server Everything that is "logic" part of game should always happen on server (spawning, updates, changing values, etc.) entity instanceof EntityPlayer - if true you know that it is player, before that you can't touch player methods. -
Short: No. Long: You might try using GL to do that.
-
Problem may occur anywhere in listed classes Proxy, GuiHandler, Container, Gui, if you are using custom slots - also might be useful and IInventory - if you implement one.
-
Any of GuiEvents give you direct access to gui you are in. In this case - there is (as mentioned) GuiOpenEvent which provides event.gui. * This event is called before any Gui will open. * If you don't want this to happen, cancel the event. * If you want to override this Gui, simply set the gui variable to your own Gui. Read docs
-
You need to understand the fact that minecraft consists of two threads - client and server. While on dedicated server, there is only server, when on client in singleplayer - there is client AND server running in background. When you connect from client to external server - client has client thread and dedic handles server. Following above - there is no "getEntityPlayerMP". You either do something for one defined "thePlayer" which is YOUR OWN (client's) entity player, or you do something for EntityPlayers on server side - where you can't just pick (well, you can pick by names or uuids). Other notes: All classes in package net.minecraft.client are for CLIENT usage only - you can't call them outside client proxy or mod will crash when ran on dedic - that includes Minecraft class itself. As to actually getting players - what you want to do? There is PlayerTickEvent that runs for client and server for every player once per tick (twice - there are 2 phases to pick from).
-
[1.8][SOLVED]Adding Icons that switch when a certain condition is met
Ernio replied to NovaViper's topic in Modder Support
I alredy told (her?) exacly same thing Through I don'tk now where the problem is, your code has flaws: boolean isGenderSet = false; if (isGenderSet == false) { Seriously? if (tagCompound.hasKey("gender", ) { this.setGender(tagCompound.getBoolean("gender")); } Please learn what that "8" is, vanilla's NBTBase. (8 is a string). Other than than that - make prints in getters and setters and track where is problem (really easy to debug). #WhyBitwiseOperations EDIT I copied bad part of code in 2nd <code>. I was referring to gender. -
I stumbled upon this thread, which is probably only thing that says anything informative about .obj support in 1.8. Since there were no responses for 3 weeks, may I ask - did anything changed regarding implementation of .obj loader (support)? My main issue is the fact that "there was someone working on a obj importer", which leaves me with question is he (or are they) still/back on track? Is it safe to assume that only support Forge gives (outside json and direct java models) is and will be B3D? Should I/We wait or implement it on my own? Is there a point? Planned upcoming other features? Thank you for any info
-
It really doesn't matter how you do it, it can even be ResourceLocation[] that would be accessed with your numbers (carrer). It's more of an optimization stuff - "new" makes new object which is pointless to do in anything that is involved in ticking operations, especially render passes. Simply have static Map<Integer, RL> or RL[] or whatever else, jsut don't call "new" all the time. (RL = ResoLoc)
-
First things 1st: Do not declare Resource with every render pass, save those as static files somewhere and just reference them. Secondly - print out your getCarrerId() - do they change on client side? Post updated entity code.
-
Always spawn on server side only. If you coded it well, client will construct it from constructor(World world) automatically.
-
All that lead me to start using Player API and Player Render API. With above I can do whatever I want with whoever I want, yet some questions still stand: In 1.7 I remember that people loaded wavefront models, I am hella sure of it. Is this feature temporary deprecated or permament change. Should I wait for replacement? Only thing I found is: - Use Json models - Use direct java models (techne and stuff) - Use B3D, which seems like only and kinda non-standard thing outside vanilla. Will wavefront come back, I read somewhere (googled hard) that person in charge of it "dissappeared", but idk if he's back. If not - should I implement it on my own (probably copy 1.7 code and update) or did someone alredy done that? If not - why, and what should I use as replacement (B3D?)? Thanks.
-
Instructions not clear, made my classpath double-load one library. CLOSED
-
[1.8] Looking for simpy instruction how to make new items mods.
Ernio replied to Szynsz's topic in Modder Support
http://www.minecraftforge.net/forum/index.php/topic,26267.0.html Examples and everything. As to swords - simply extend ItemSword instead of Item class (like in linked tut). -
I am lost as to what should I do to work with this API. API link: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1283669-render-player-api There is FAQs->#3->1.7.2 and later. - that says: By developing with Render Player API core instead of Player API forge you don't need to deobfuscate at all. Put the RenderPlayerAPI.jar in your development environment's mods folder. Add /RenderPlayerAPI.jar to the classpath of your mod project. Start developing. Don't I need to change stuff in build.gradle? Is there tutoarial on how should it look? I am green when it comes to FGradle ;c Thanks.
-
[1.7.10][Solved] setBlock server side using packets?
Ernio replied to Jodelahithit's topic in Modder Support
First, one word: SimpleNetworkWrapper http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-2-customizing-packet-handling-with Short and tight: http://www.minecraftforge.net/forum/index.php/topic,20135.0.html Second: You can't use Minecraft.class on server logical side - never ever, that class is client only, and will crash on dedicated server. You either have to raytrace on client and send coordinates to server or copy client classes to your mod and use them on server (I am not sure if rayTrace exists on server, check it 1st). -
Anyone? EDIT - I am still digging, so far I see some useful methods in Item that would allow me to replace EntityItem (in world) with my custom entity with custom renderer assigned that would be able to read ItemStack's NBT and render custom entity model - sadly, that is only for item in world case. All questions about what is supported still stand. I should also note that I cannot use e.g item#getArmorModel - this is for slots 1-4, I have custom EQ.
-
Getting started with changing vanilla minecraft code
Ernio replied to lblackburn's topic in Modder Support
No. You either make new entity and register it as separate entity, or you use events to hook into vanilla ones. There is like milions of tutorials on "How to use Events in Forge". Say exacly what you want to archieve, then we can be more direct, otherwise - read ab out events (tutorial, code, anything). To for example hook into update() method of entity (one that is called every tick) you can use LivingUpdateEvent. Notes: Remember to register entity, understand that client events should be put into client proxies, know that there are few different buses that will call event. Everything can be found VERY easily on google.