Jump to content

WildHeart

Members
  • Posts

    236
  • Joined

  • Last visited

Everything posted by WildHeart

  1. I need to to player could go on full server
  2. Hi, how to allow connect player to full server, without: asm and iClassTransformer? If it is impossible without them, then how to do it using asm/iClassTransformer?
  3. Hello, i created a custom tab and custom items and when i open CreativeInventory, i see a my items in all tabs. How to fix it? Code Item: class ItemMoney: Item { init { this.setRegistryName("money"); this.setUnlocalizedName("money"); this.setCreativeTab(Crank.tab); this.setHasSubtypes(true); } override fun getSubItems(tab: CreativeTabs, subItems: NonNullList<ItemStack>) { MoneyType.values().mapTo(subItems) { ItemStack(this, 1, it.meta) } } override fun getUnlocalizedName(stack: ItemStack?): String { return super.getUnlocalizedName() + "." + MoneyType.byMetadata(stack!!.metadata).getName() } } Code Tab: class CustomTab: CreativeTabs("customtab") { override fun getTabIconItem(): ItemStack { return ItemStack(Items.APPLE) } }
  4. Reflection is very slow, better AccessTransformer's
  5. Hello, i want to change biome temperature, how to make? I found BiomeProperties, but the Biome is not a field/method to get BiomeProperties. (for vanilla biome)
  6. Ups, my fail. Corrected. @SubscribeEvent public void onClone(PlayerEvent.Clone e) { if (e.wasDeath) { InventoryPlayer orig = e.original.inventory; for (int i = 0; i < orig.getSizeInventory(); ++i) { if (orig.getStackInSlot(i).getItem() instanceof CustomArmor || orig.getStackInSlot(i).getItem() instanceof CustomWeapon) { e.entityPlayer.inventory.setInventorySlotContents(i, orig.getStackInSlot(i)); } } } }
  7. @SubscribeEvent public void onClone(PlayerEvent.Clone e) { if (e.wasDeath) { InventoryPlayer inv = e.entityPlayer.inventory; for (int i = 0; i < inv.getSizeInventory(); ++i) { if (inv.getStackInSlot(i).getItem() instanceof CustomArmor || inv.getStackInSlot(i).getItem() instanceof CustomWeapon) { inv.setInventorySlotContents(i, e.original.inventory.getStackInSlot(i)); } } } } ?
  8. So, if (st.getItem() instanceof MyItem) { e.entityPlayer.inventory.copyInv(e.original.inventory); }
  9. Yes, but this copy inventory, not a specific item.
  10. So, isEmpty corrects this, but items is not saving:/
  11. Hello, i use event PlayerEvent.Clone for saving items with death, but if i use that code, my mc has been crashed. @SubscribeEvent public void onClone(PlayerEvent.Clone e) { if (e.wasDeath) { ItemStack backStack = null; for (ItemStack stack : e.original.inventory.mainInventory) { if (stack != null && (stack.getItem() instanceof ModGun || stack.getItem() instanceof ModTool)) { backStack = stack; } } if (backStack != null) { e.entityPlayer.inventory.addItemStackToInventory(backStack); } } } What's the problem?
  12. Hello, i have npc and gui for him and message for spawn second npc(support), but i dont know how to do it more safely, so couldn't the players themselves send from the client package and not to spawn the entity. How to check that the person who spawned, it's my nature and not the player? I think it would be safer.
  13. On older versions it was possible to load the model via AdvancedLoader(or something like this), but now everything has changed and the download goes through json, besides the added materials. How to upload your model using the "new" bootloader?
  14. So, i updated my mini mod to 1.8.9, and the problem remained.
  15. What is the minimum version supported on this forum?
  16. Oh, 1.7.10, sorry, in title i set the 1.10.
  17. Hello, i have a private constructor in SoundEventAccessor and i want to set that constructor to public. I use a access transformer for this, but it not work. Constructor: SoundEventAccessor(SoundPoolEntry p_i45123_1_, int p_i45123_2_) { this.field_148739_a = p_i45123_1_; this.field_148738_b = p_i45123_2_; } In *NAME*_at.cfg: public net.minecraft.client.audio.SoundEventAccessor <init>(Lnet/minecraft/client/audio/SoundPoolEntry;I)V Spent the following command: "gradlew clean setupDecompWorkspace --refresh-dependencies" and in build.gradlew attribute for manifest has been setted.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.