Podshot / MCEdit-Unified

Combined MCEdit & Pymclevel repository.
http://podshot.github.io/MCEdit-Unified/
ISC License
483 stars 109 forks source link

Shop Filter Issue (Both stockFiltersDir and portableFiltersDir on the sys.path) #383

Closed Azounstone closed 9 years ago

Azounstone commented 9 years ago

I am now adding in excess of 200 shops to our adventure map and have noticed that the filter has some issues and does not work correctly. The problems are that even though you give the villager a name it does not show in game and when you trade with it the ui shows the default village job name.

The images below show this:

MCEdit screen showing custom name 2015-05-04 11-59-15-am

Villager in game with no name showing 2015-05-04_11 51 59

UI Showing different name 2015-05-04_11 51 47

I am trying to get these added so I can release the project on PMC but this is stopping me from doing so. Is there any chance somebody could fix the filter and let me have the revised one please? I would be very appreciative if so :)

Regards,

Rubisk commented 9 years ago

Looks like both the fixed and portable dir are on the sys.path, probably because we messed up the filter code. You'll probably have to wait until are next release for this to be fixed. The forester issue is most likely caused by the same thing that's causing the shop filter not to work.

codewarrior0 commented 9 years ago

After a quick search, I'd say sys.path is being modified a lot more than necessary. Every reference to it should be carefully scrutinized.

Azounstone commented 9 years ago

Good to know that the issue has been identified and will get fixed. Do you know when the next issue is as I am trying to finish this adventure map so it can be released?

Rubisk commented 9 years ago

Unfortunately not. As soon as it's done, I guess. If you use the debug filter in fixed mode the villager gets created correctly, you can use that for the time being.

Azounstone commented 9 years ago

Okay will continue using this filter then.

Good luck with the next release :)

LaChal commented 9 years ago

@Azounstone: would you mind to test this in the next release and report here then?

Thanks!

Azounstone commented 9 years ago

@LaChal Of course, be happy to help.

Azounstone commented 9 years ago

UPDATE

It seems that if you run the filter with it on either the rotation or the custom head tab it does NOT add the NPC name despite it having been filled in. It would seem that you HAVE to be on the default tab when you run the filter to get it to show names.

Azounstone commented 9 years ago

Also, I can not get it to add another player's head. It works fine with skull3 and my own head but not for anything else.

Can you please tell me how I get MHF_Alex to show or another player's head as I need to do this for a number of the shops.

LaChal commented 9 years ago

We're actually working on this.

This issue may involve several very different parts of code. It can take a bit of time to fix it.

Azounstone commented 9 years ago

@LaChal Thx for replying and fingers crossed it doesn't take too long to have a working filter again :)

Azounstone commented 9 years ago

Can you please confirm if the recent release addresses this issue so I know if to use it and test it properly?

naor2013 commented 9 years ago

Can you check if it's fixed?

Azounstone commented 9 years ago

As I asked can you confirm that this new release addresses this issue? If you confirm this then I will test it extensively for you.

Rubisk commented 9 years ago

Yes I can confirm.

Azounstone commented 9 years ago

Hi, ok I will download this release and test it today.

Azounstone commented 9 years ago

UPDATE

Norton Anti-virus removes the file on download as it triggers a WS.Reputation.1 alert:

Updated: February 15, 2012 3:15:47 PM Type: Other Risk Impact: High Systems Affected: Windows 2000, Windows NT, Windows Server 2003, Windows Server 2008, Windows Vista, Windows XP

Behavior WS.Reputation.1 is a detection for files that have a low reputation score based on analyzing data from Symantec’s community of users and therefore are likely to be security risks. Detections of this type are based on Symantec’s reputation-based security technology. Because this detection is based on a reputation score, it does not represent a specific class of threat like adware or spyware, but instead applies to all threat categories.

The reputation-based system uses "the wisdom of crowds" (Symantec’s tens of millions of end users) connected to cloud-based intelligence to compute a reputation score for an application, and in the process identify malicious software in an entirely new way beyond traditional signatures and behavior-based detection techniques.

I have restored it and will test it now but you should address this alert issue.

Azounstone commented 9 years ago

UPDATE:

Upon clicking the button Filter it gives 2 errors:

https://cloud.githubusercontent.com/assets/9461336/7577599/04c0095c-f842-11e4-96e5-dce7c2c7ee0c.jpg

https://cloud.githubusercontent.com/assets/9461336/7577601/11bc9b84-f842-11e4-9ee6-3ac877dca207.jpg

I reported this to you 21 days ago.

In addition to this I enclose a console image showing this too:

image2

You can also see that it is running the filter when I ran it from the install location not the fixed location and it does not work. It creates a villager with a default skull3 head even though I used a player name as shown below:

2015-06-01 01-56-09-pm 2015-06-01 01-56-16-pm 2015-06-01 01-56-21-pm 2015-06-01_14 02 45

It is the same in both modes, Fixed and Portable.

Suffice to say this does not solve the issue.

Azounstone commented 9 years ago

Hello,

I took the time to test this and post info so it would be nice if somebody acknowledged this etc please. and advise accordingly.

Rubisk commented 9 years ago

Hi. Let me make a little statement first: We do not work for you. Every single one of us works on MCEdit as a hobby. We don't get paid, we do it just because we want to. Everyone of us has their own lifes, and their own stuff to do. We try to keep up with issues and fix them, and we find it just as annoying as you that this doesn't work, but it might sometimes take us a few days to get back to you. Don't blame us for that.

About the Norton thing: I have no idea. I noticed my antivirus keeps trying to deinstall my python too, I think it has something to do with a module in it, but I don't feel like figuring it out right now. It should be all fine, if you don't trust us nobody forces you to install the software.

About the 2 errors: Those are completely unrelated to your filter, and have something to do with the Forester filter not loading it's module correctly. It may be because your sys.path is messed up (AKA same cause), but does not cause this issue.

I took ANOTHER look at the filter code, and there really is no way the filter should set the shop but not the name. You are running an outdated or different version of the filter. I suggest you take the following steps:

In MCEdit, press Ctrl-Alt-F9. In the window that appears, type import sys; print sys.path and press return. In the console, a bunch of paths should appear. Send us those.

Secondly, navigate to Downloads\Minecraft\Mcedit\mcedit. There should be a CreateShops.pyc here, delete it. There should also be a CreateShops.py. Check if it's the same in the repo. If there is no .py file, just delete the .pyc and retry. See if that fixes it.

Lastly, I would suggest you redownloaded my debug filter, and installed it into mcedit. See if that fixes it.

UPDATE: I just redownloaded a fresh MCEdit 1.3.3.0, and installed it into a clean directory. For me, the filter loaded from My Documents\MCEdit\Filters\CreateShops.py, and in portable from MCEdit_1330\Filters (Mcedit is installed in MCEdit_1330\mcedit)

So, the most likely issue is that there's a leftover Createshops.py or Createshops.pyc somewhere in the mcedit root directory. Please try scan through both your mcedit install dir and your My Documents\MCEdit dir for any CreateShops.py,.

Khroki commented 9 years ago

Yeah, I know about the Norton thing, I build releases on a PC with Norton Security Suite normally but this one was built on Rubisk's pc , just click details then click restore. The thing does it for pretty much any rare or brand new program/version it doesn't recognize and there's not a lot that can be done.

Azounstone commented 9 years ago

You misunderstand my post, it was not my intention to make you feel like you do. Anyway, moving on...

If you had read it properly you would see I said quite clearly and used images to show it too, that it doesn't load the custom head. I said nothing about the name.

Therefore I am not surprised you can't find anything wrong with the filter as you're looking for something that works.

The results of typing what you asked:

image1

Rubisk commented 9 years ago

That isn't surprising. Dassiewassie does not have a skin registered under the Mojang server. Please try it with "Notch" as player and see if that works.

If Dassiewassie is your account, please make sure you have actually bought the game, and uploaded a skin to the proper Mojang server.

Azounstone commented 9 years ago

Hello,

/summon Villager -209 56 1843 {CustomName:"Dassiewassie",CustomNameVisible:1,Profession:2,Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:Dassiewassie}}],DropChances:[0.085F,0.085F,0.085F,0.085F,0.0F],Rotation:[90f,0f],PersistenceRequired:1,NoAI:1,Silent:1}

2015-06-04_12 43 37

This summons a villager facing the right way with a custom name and a head that you say isn't meant to work as it doesn't exist.

If this works then I would expect yours to do this as well.

Therefore I see little point in testing other things as it will mean it doesn't do as hoped for. With regards to you removing the labels and saying you do not have enough info I am at a loss to know what more I could do to try to provide you with data and info to help you address this. Just look at this thread?

Also how do I remove the annoying 2 errors that appear when pressing filter?

Azounstone commented 9 years ago

Also, to say this:

If Dassiewassie is your account, please make sure you have actually bought the game, and uploaded a skin to the proper Mojang server.

Is insulting and rude!

It is a paid for game with a genuine account and works as you can see in my image above.

Rubisk commented 9 years ago

Your skin was down half an hour ago. May have been the Mojang servers. I just loaded the cached Mojang page from my Mojang, 30 minutes ago it did in fact return a 404. Not my fault.

I'm not trying to insult you, all I'm trying to do is figure out why it doesn't work. I can understand that waiting and having to answer "silly" questions, but it's necessary ;-)

I'm digging deeper.

Azounstone commented 9 years ago

Hi, It's not my skin but thanks for digging deeper :)

Rubisk commented 9 years ago

I just ran the filter once again, the filter just works for me. I checked with both a skin I used before, and with a random one I got from a minecraft skin site, they both worked.

Here's some more questions:

Azounstone commented 9 years ago

I will do this for you later today as just off out. I will post results here but I would like to add that if it does it for one skull it should do it for all I would have thought.

It works for my skull for example.

Rubisk commented 9 years ago

It works? The filter does what it's supposed to do? If that's the case we can close this issue.

Azounstone commented 9 years ago

Maybe read my reply from 3 days ago. It does not work as you can see from that post and yet I can create a villager with the head used in that post in my response today.

Therefore I have no idea why you think it might work?

Anyway, when it works with Dassiewassie as a head then I think we can say it works.

So perhaps test this yourself with that head?

Rubisk commented 9 years ago

????

Can you create a villager with a custom head using the filter: Yes or no?

Azounstone commented 9 years ago

No I just tried with Dassiewassie as the head and it loaded the default skull3 head.

Try it yourself please.

Rubisk commented 9 years ago

I just did. It works. As I said, I cannot reproduce your issue. Please send the entitydata of the villager that didn't creat correctly.

Azounstone commented 9 years ago

It does not work:

2015-06-04 01-39-31-pm 2015-06-04 01-39-42-pm 2015-06-04 01-39-49-pm

2015-06-04_13 40 17

[13:40:40] The data tag did not change: {HurtByTimestamp:0,Attributes:[0:{Base:20.0d,Name:"generic.maxHealth"},1:{Base:0.0d,Name:"generic.knockbackResistance"},2:{Base:0.5d,Name:"generic.movementSpeed"},3:{Base:16.0d,Name:"generic.followRange"}],Riches:200,Invulnerable:1b,ForcedAge:0,PortalCooldown:0,AbsorptionAmount:0.0f,FallDistance:0.0f,DeathTime:0s,DropChances:[0:0.085f,1:0.085f,2:0.085f,3:0.085f,4:0.085f],PersistenceRequired:1b,HealF:20.0f,Age:0,Motion:[0:0.0d,1:0.0d,2:0.0d],Leashed:0b,UUIDLeast:-6157083550913984018L,Health:20s,origX:1097,randomMobsSkin:279995016274598L,origZ:-605,Silent:1b,origY:56,Air:300s,OnGround:1b,Dimension:0,Offers:{Recipes:[0:{maxUses:2000000000,buy:{id:"minecraft:fence",Count:1b,Damage:0s},sell:{id:"minecraft:ladder",Count:1b,Damage:0s},uses:0,rewardExp:1b},1:{maxUses:7,buy:{id:"minecraft:barrier",Count:1b,Damage:0s},sell:{id:"minecraft:barrier",Count:1b,Damage:0s},uses:0,rewardExp:1b}]},NoAI:1b,Rotation:[0:180.0f,1:0.0f],Profession:2,UUIDMost:-8279449558310567813L,CustomName:"Dassiewassie",Equipment:[0:{},1:{},2:{},3:{},4:{id:"minecraft:skull",Count:0b,Damage:3s}],Pos:[0:1097.5d,1:56.0d,2:-605.5d],Fire:-1s,CanPickUpLoot:1b,HurtTime:0s,CareerLevel:1000,Career:1,Inventory:[],CustomNameVisible:1b,Willing:0b}

As you can see it has NOT used the skull selected.

Rubisk commented 9 years ago

Hmm, its seems lik you're using a modified version of minecraft called Spoutcraft, which generates skins itself. Unfrotunately, I can't help you with that, as we do not support mods (or at least not Spoutcraft in particular).

Does it work on a vanilla server?

Azounstone commented 9 years ago

Hello,

This is a vanilla version of minecraft and not modified other than using mc patcher.

Rubisk commented 9 years ago

origX:1097,randomMobsSkin:279995016274598L,origZ:-

These are generated by Spoutcraft, according to me googling for a few minutes. I don't know what MCPatcher is, got to go here, but please try on a world that doesn't have these.

Hmm, apparently it's a modloader. That's a mod :/ Please try on a vanilla 1.8.6 jar

Azounstone commented 9 years ago

It is vanilla 1.8.6jar

[13:57:18] The data tag did not change: {HurtByTimestamp:0,Attributes:[0:{Base:20.0d,Name:"generic.maxHealth"},1:{Base:0.0d,Name:"generic.knockbackResistance"},2:{Base:0.5d,Name:"generic.movementSpeed"},3:{Base:16.0d,Name:"generic.followRange"}],Riches:200,Invulnerable:1b,ForcedAge:0,PortalCooldown:0,AbsorptionAmount:0.0f,FallDistance:0.0f,DeathTime:0s,DropChances:[0:0.085f,1:0.085f,2:0.085f,3:0.085f,4:0.085f],PersistenceRequired:1b,HealF:20.0f,Age:0,Motion:[0:0.0d,1:0.0d,2:0.0d],Leashed:0b,UUIDLeast:-7709503698328952699L,Health:20s,Silent:1b,Air:300s,OnGround:1b,Dimension:0,Offers:{Recipes:[0:{maxUses:2000000000,buy:{id:"minecraft:wooden_button",Count:1b,Damage:0s},sell:{id:"minecraft:diamond_sword",Count:1b,Damage:0s},uses:0,rewardExp:1b},1:{maxUses:7,buy:{id:"minecraft:barrier",Count:1b,Damage:0s},sell:{id:"minecraft:barrier",Count:1b,Damage:0s},uses:0,rewardExp:1b}]},NoAI:1b,Rotation:[0:180.0f,1:0.0f],Profession:2,UUIDMost:6727546460132099890L,CustomName:"Dassiewassie",Equipment:[0:{},1:{},2:{},3:{},4:{id:"minecraft:skull",Count:0b,Damage:3s}],Pos:[0:1097.5d,1:56.0d,2:-605.5d],Fire:-1s,CanPickUpLoot:1b,HurtTime:0s,CareerLevel:1000,Career:1,Inventory:[],CustomNameVisible:1b,Willing:0b}

This is without mc patcher

Khroki commented 9 years ago

Let me see if I got this right, you want to put a skull with a skin on it on a villager, but naming the villager doesn't do that since there's nothing to set the skull skin in the shop filter's code. Naming the villager doesn't set the necessary data to make the skull have a skin. It took me a while to grasp it because you're using that resource pack which I don't think either of us are familiar with.

Nvm, got clarification from Rubisk.

Azounstone commented 9 years ago

Hello,

Let me try to make this clear...

I just used vanilla minecraft with NO resource pack. I created a chest with a buy and sell item in it.

I then ran the filter using the data in the 3 images below and it created a villager as per the image below without a custom skull.

2015-06-04 02-51-04-pm 2015-06-04 02-51-11-pm 2015-06-04 02-51-16-pm

2015-06-04_14 51 36

However I can use this command and it works:

/summon Villager 1095 56 -606 {CustomName:"Dassiewassie",CustomNameVisible:1,Profession:2,Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:Dassiewassie}}],DropChances:[0.085F,0.085F,0.085F,0.085F,0.0F],Rotation:[180f,0f],PersistenceRequired:1,NoAI:1,Silent:1}

2015-06-04_14 54 05

I hope this clarifies this once and for all :)

Regards

Khroki commented 9 years ago

That is a lot clearer, thanks. Question, did you press enter after setting the name in the head tab of the create shops filter? I don't think it takes if you type then press filter.

untitled

Azounstone commented 9 years ago

Hi,

I entered the text then clicked a different tab to input the data there

Azounstone commented 9 years ago

I did it in the order of the three images

Khroki commented 9 years ago

Try hitting the enter key to set it, if that doesn't work could you give me the filesize of the createshops filter (actual and on-disk) in bytes

codewarrior0 commented 9 years ago

Question, did you press enter after setting the name in the head tab of the create shops filter?

This is the problem. You need to call field.get_text, not field.value.

In fact, why are you creating another TextFieldWrapped when TextInputRow already creates one for you? Argh...

Khroki commented 9 years ago

TextInputRow didn't exist when the filter was written, I added that some time back when the chest editor was updated. Or at least it's current state anyway.

Azounstone commented 9 years ago

Sorry this is getting very confusing. Could you provide instructions on how to use this shop filter as it does NOT seem to work the way other filters are used. In fact I do not press enter when entering any data in the filter yet it creates the name just fine and that has been a feature for a long time. The custom head was added later so based on what codewarrior just said it would imply the issue lays with the way custom heads was added in as much as it was coded differently to the custom name.

Therefore, please advise how each tab/section should be filled in and if enter should or should not be used etc.

Khroki commented 9 years ago

For now just press enter on the skull field, we're doing more testing.

codewarrior0 commented 9 years ago

It's a problem with all filters, not just this one. It looks like when you switch tabs, any text field you just typed into gets moved offscreen so its commit() method never gets called so its value attrib is never updated.