Closed mibby closed 10 years ago
We would probably have to recreate the 1.8 anvils and reinject it into the server.
We can't just steal stuff and put it in.
Everything we do is almost always our own code, with the exception of libraries.
@NavidK0 Noticed some enchanting table commits. Compiled source as of commit https://github.com/NavidK0/Carbon/commit/2a875140ece37a441675e20a41e8d54df3a5be5c
Enchanting table automatically has 3 laps in it. You are able to dupe lapis by right clicking the stack, moving it all around in the inventory GUI, and shift clicking back and forth. Eventually the 'fake' disappearing client-side lapis becomes real, dupable.
Another way to easily check if dupable is put in an item to be enchanted, grab any enchantment, then take back the enchanted tool and the spawned in lapis. Example: Put in stone sword, grab first enchantment, take both enchanted stone sword and spawned in lapis generated by the enchanting table into your inventory, profit?
@mibby It's not Carbon that does it, it's all spigot protocol hacks. I know @Shevchik is working on enchanting tables, though.
Spawned in lapis is not real, it can't duped. But no update slot packet sent when you are operating with this fake item, so you will sometimes see it in your inventory while actually it doesn't exist.
@Shevchik Well, it becomes real after enchanting an item. You are able to take the lapis and drop it on the ground. As I stated above, sometimes you are able to make it real by shift clicking/moving it around the inventory, not even enchanting an item. But, enchanting an item makes it real 100% of the time I tested.
@mibby Are you in creative while doing this? I can't replicate that in survival, but all lapis becomes real in creative. Makes sense, client can spawn all the items it thinks it has.
@Jikoo I tested in creative, yes. But, I am not middle mouse clicking the lapis. Simply dragging it from the GUI after enchanting a sword. I'll test in survival later in the day to verify, but creative shouldn't have anything to do with it since I'm not middle clicking to spawn in the lapis. (As when I try to drag it once normally, not enchanting anything, it doesn't exist.)
It doesn't matter if it is middle mouse click or not. Read minecraft protocol. Creative client can add anything to it's inventory if it wants so. The item is fake and can't be duplicated in survival.
@mibby The server doesn't just spawn things with a middle click. It doesn't know when you have the creative menu open for sure as it's clientside. Any click can spawn any number of things, the vanilla client just doesn't support it under ordinary conditions.
Should be fully working now
You could make a method that calls a drop event get the item and remove it. But I'm not sure of any other way to do this or check the players inv for a item maybe tag it some how with meta data or something
is it possible to create and call a new GUI
i would start in the TileEntityArcaneInscriber.class and re-make a GUI for ISidedInventory.class i dont know if this is possible in server side but its worth a try
in sudo it would be: public class TileEntityArcaneInscriber extends TileEntityEnchantmentTable implements CustomISidedInventory{
//Code Here
}
Using a 1.8 client on the latest spigot patch, anvils and enchanting tables do not function properly and have a buggy GUI. Is it at all possible to implement the new 1.8 anvils and crafting table functions?