TheCBProject / NotEnoughItems

MIT License
48 stars 19 forks source link

Unnecessary ASM Overrides Causing Mod Incompatibilities #32

Closed jredfox closed 7 years ago

jredfox commented 8 years ago

This mod breaks any entity items spawning in if the entity item is instanceof BlockMobSpawner entity item. I have made silk spanwers fully working with 1.10.2 and it won't spawn in the entity item if the NEI is loaded. It works perfectly fine without it. Entity item is an item on the ground. It works perfectly without it spawning in the itemstack if NEI isn't loaded. This isn't on my side why is nei using asm to prevent entity items from spawning in? Use event handler to read the tile entity not asm to break the game and prevent any entity item from spawning in.

Code: https://gist.github.com/jredfox/e3167722ae861d8b16665e6b66971521

problem two and three it breaks the vanilla translation stack override both of tooltips and display name overrides

@Override public String getItemStackDisplayName(ItemStack stack) { //event doesn't get fired or doesn't work System.out.println("Test"); }

@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean torf) { //event doesn't get fired or doesn't work System.out.println("Test"); }

So where is this CB project manager that you were talking about I can't find him anywhere. Why is this mod modifying spawners since NEI no longer modifies anything having to do with spawners in 1.10.2 so why is it modifying the entity items in the spawners and blocking tooltips, and name display overrides

As of 1.10.2 update for NEI is now incompatible with my mod silk spawners the code for the block drop is above but, here is my forum as well.

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2743544-silk-spawners-not-enough-items-support

Note this mod also no longer deals with adding mob spawners to the JEI tabs so why is it that this is breaking mob spawners to?

Question why is NEI even a thing since JEI still works without it? If you were making item stacks to read modded and vanilla mob spawners again like in 1.8 and 1.7.10 I would understand but, you don't so is this in a beta state? If you do add the mob spawners back don't use asm use on block place method and support nbt tag compounds for sub entites support. Get the block at it's position if instanceof block mob spawner have a tag compound that system that goes in parallel with vanilla's and then make the tile entity read it then it will update it. If you no longer want to modify spawners then why is it that you are breaking them still to make it impossible for any entity item instanceof block mob spawner from spawning in?

/give @p mob_spawner 1 0 {BlockEntityTag:{SpawnData:{id:"Creeper"}, SpawnPotentials:[0:{Entity:{id:"Creeper"},Weight:1}] }}

that will work with cheats enabled for 1.10.2+ however if you want it to work in survival without cheats simply make it read the tile entity without the restrictions like in my code. I don't understand why you modify the spawner breaking any mod compatibility along with not doing what you did in 1.8 and 1.7.10.

covers1624 commented 8 years ago

Spawners for 1.10 in NEI were never finished, ive commented out its ASM and it will be replaced with events, Not sure about the ItemStack stuff, works fine with my stuff. Regarding ASM as a whole, im in the process of moving all of CB's stuff away from being a coremod, and NEI is actually next on the list. Regarding why NEI exists at all in 1.10, after many talks with @mezz we decided it would be best for NEI to "Re Skin" JEI, so JEI will be in control of the recipes and such and NEI will add back the widgets. It will require a full rewrite to reach this stage but knocking out the ASM is the first step and once it is gone it should be a lot easier to move it to the pure widgets state.

mezz commented 8 years ago

In the recent versions of Minecraft, you can create any type of spawner by grabbing a regular "spawner" item and then right clicking it with a spawn egg. I don't think the special NEI spawner items are necessary any more.

jredfox commented 8 years ago

Well get rid of all spawner modifying code via asm so my mod silk spawners will work properly. Please set your event priorities to high so mine will override yours or do exactly how my code works - the old if nei is loaded method. Because, if you don't cancel the event and yours takes place first mine will override and mine has alot more support for other things and would appreciate it.

"In the recent versions of Minecraft, you can create any type of spawner by grabbing a regular "spawner" item and then right clicking it with a spawn egg. I don't think the special NEI spawner items are necessary any more."

For getting the egg yes but, my mod doesn't add craftable eggs. My mod adds in forge eggs as well and forge eggs are added for any mob that doesn't have one. As for setting spawner nbt and right clicking it upon block placement only reads it in vanilla if cheats are on, my mod fixes this.

covers1624 commented 8 years ago

I know how events work. Spawners are dead now for the moment and will be re added to use the BlockEntityTag system.

jredfox commented 8 years ago

Make sure to support nbt entity ids rather then global ids for sub types and forge mobs. Thanks. I will make my event handler low next time I update and can take care of the rest once your side is done. There is a hashmap in EntityList that you can get all of the entity ids (not global) used via summon command

jredfox commented 7 years ago

How is the progress going on removing unnecessary spawner code asm. Your mod is currently incompatible with my mod and I was hoping you would fix this before my next port to 1.10.2. I am almost ready to report just one more major update and I am going to do it.

I don't really care if you just literally just take the mob spawner asm out please make this compatible and worry about re-writing the mod later please.

covers1624 commented 7 years ago

At the moment the asm should be disabled..

jredfox commented 7 years ago

I will test this when I have time then....

covers1624 commented 7 years ago

NEI's Mod spawner is currently disabled. Closing this.

jredfox commented 7 years ago

Thanks.

Does this still add any spawners to the tabs still? If so make sure it contains all living entities regardless of entity id and have a block read event to update the tile entity to the new one.

I think I will port this mod again soon to newer versions. I am currently debugging many bugs right now though.