Guest User

Untitled

a guest
May 22nd, 2020
48
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Entity entity = (Entity) dependencies.get("entity");
  2. int x = (int) dependencies.get("x");
  3. int y = (int) dependencies.get("y");
  4. int z = (int) dependencies.get("z");
  5. HashMap guistate = (HashMap) dependencies.get("guistate");
  6. World world = (World) dependencies.get("world");
  7. if ((((new Object() {
  8. public String getText() {
  9. TextFieldWidget textField = (TextFieldWidget) guistate.get("text:BPSEARCH");
  10. if (textField != null) {
  11. return textField.getText();
  12. }
  13. return "";
  14. }
  15. }.getText())).equals("Fusil Mondragon"))) {
  16. entity.getPersistentData().putString("Blueprintofchoice", "Fusil Mondragon");
  17. entity.getPersistentData().putDouble("BlueprintpriceGold", 100);
  18. entity.getPersistentData().putDouble("BlueprintpriceSaphir", 475);
  19. {
  20. Entity _ent = entity;
  21. if (_ent instanceof ServerPlayerEntity) {
  22. BlockPos _bpos = new BlockPos((int) x, (int) y, (int) z);
  23. NetworkHooks.openGui((ServerPlayerEntity) _ent, new INamedContainerProvider() {
  24. @Override
  25. public ITextComponent getDisplayName() {
  26. return new StringTextComponent("BPMarketBuy");
  27. }
  28.  
  29. @Override
  30. public Container createMenu(int id, PlayerInventory inventory, PlayerEntity player) {
  31. return new BPMarketBuyGui.GuiContainerMod(id, inventory, new PacketBuffer(Unpooled.buffer()).writeBlockPos(_bpos));
  32. }
  33. }, _bpos);
  34. }
  35. }
  36. } else {
  37. if (entity instanceof PlayerEntity && !world.isRemote) {
  38. ((PlayerEntity) entity).sendStatusMessage(new StringTextComponent("We do not understand what you've just entered, please retry."),
  39. (false));
  40. }
  41. if (entity instanceof PlayerEntity)
  42. ((PlayerEntity) entity).closeScreen();
  43. }
RAW Paste Data