Jump to content

Differentiation

Members
  • Posts

    606
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Differentiation

  1. I'll just upload the necessary files to the Git, since the whole thing will take days.
  2. Log.info(Object o) in PlayerTickEvent And I also check if I have fall damage when I log in and if I'm invulnerable, etc.
  3. I mean, this.invulnerable, this.fallDamageImmune, etc. are all set to false when I log in, even though I set them to true when I logged out (certain commands I made that use these functions).
  4. Hey, In my player capability class, the capabilities reset when logging out and back in. I handled the capability persistence when the player clones, but I can't seem to understand how to do it for when the player logs out. Any help is appreciated. Thanks!
  5. Hey, Is there any way to cancel player's knockback? Perhaps some event I need to cancel? Thanks!
  6. I'm using EntityJoinWorldEvent.
  7. 1 Check if the entity instance is an EntityPlayer. 2 Check for client side. 3 What Jabelar said, too.
  8. Hey! I am well aware of the methods of sending a player a message in the chat, but I was curious to know the way to print a text in a player's ActionBar. Please help. For any of you who do not know what I mean by ActionBar, it is this: Thanks!
  9. So it's just as simple as this?: @SubscribeEvent public void registerBlocks(RegistryEvent.Register<Block> event) { event.getRegistry().registerAll(block1, block2, ...); }
  10. Hey! So I recently updated my mod to 1.12.2. Now, I know there is this new efficient way of registering Items and Blocks via the Registry Events, but I'm not too sure how you do that... This is what I currently have: public static void registerItem(Item item) { item.setCreativeTab(Dinocraft.ITEMS); ForgeRegistries.ITEMS.register(item); Utils.getLogger().info("Registered item: " + item.getUnlocalizedName().substring(5)); } public static void registerRender(Item item) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(new ResourceLocation(Reference.MODID, item.getUnlocalizedName().substring(5)), "inventory")); Utils.getLogger().info("Registered render for " + item.getUnlocalizedName().substring(5)); } public static void register() { //Food registerItem(POTATOSHROOM_PIE); registerItem(CHUNKY_FLESH); //Material registerItem(CHLOROPHYTE_INGOT); registerItem(FLOBBER_INGOT); registerItem(SHEEPLITE_INGOT); registerItem(PEBBLES); registerItem(CRACKED_PEBBLES); registerItem(LEAF); registerItem(BLEVENT_INGOT); registerItem(RANIUM); registerItem(PEBBELONEUM); //? registerItem(TUSKERERS_HEART); registerItem(TUSKERERS_CHARM); //WIP registerItem(VINE_BALL); registerItem(SLINGSHOT); registerItem(VINE_BALL_BUNDLE); registerItem(POISON_BALL); registerItem(POISON_BEATLER); registerItem(RAY_BULLET); registerItem(RAY_GUN); } public static void registerRenders() { //Food registerRender(POTATOSHROOM_PIE); registerRender(CHUNKY_FLESH); //Material registerRender(CHLOROPHYTE_INGOT); registerRender(FLOBBER_INGOT); registerRender(SHEEPLITE_INGOT); registerRender(PEBBLES); registerRender(CRACKED_PEBBLES); registerRender(LEAF); registerRender(BLEVENT_INGOT); registerRender(RANIUM); registerRender(PEBBELONEUM); //? registerRender(TUSKERERS_HEART); registerRender(TUSKERERS_CHARM); //WIP registerRender(VINE_BALL); registerRender(SLINGSHOT); registerRender(VINE_BALL_BUNDLE); registerRender(POISON_BALL); registerRender(POISON_BEATLER); registerRender(RAY_BULLET); registerRender(RAY_GUN); } I mean this works and does the job perfectly fine, but I heard that the recommended way of registering it is by using the registry events. Any help is welcome. Thanks!
  11. Ah yes. You could still follow the 1.10.2 tutorials but just change the registration for items, blocks, entities, etc. to the registry events.
  12. Correct. Do a null check for the armorItemInSlot(...) in whatever slots you want and then compare it to an armor item to check for. Done.
  13. PlayerList::canSendCommands(GameProfile... profile)
  14. Hey! What is the way to check if a player is opped to a certain permission level? I have tried to figure this out but I couldn't. Any suggestions are welcome. Thanks!
  15. I already had that method in the proxies, I just forgot it's there to my disposal
  16. This will crash me on a Dedicated Server. Is there a way to get the UUID from the String of the player's name (e.g. "Differentiation" would give "6c12d8f3233c44d3baf0cf32e9f089dd")?
  17. Hey! So in ClientChatRecievedEvent, once a player name is present in a received message, is there any way to get the EntityPlayer instance from the player name String? Is there any way to get the EntityPlayer instance in ClientChatRecievedEvent at all? Should I use a different Event? Any suggestions are welcome. Thank you!
  18. List<ItemStack> items = new ArrayList<ItemStack>(); for (int i = 0; i < tile.getInventory().getSlots(); ++i) { if (!tile.getItem().getStackInSlot(i).isEmpty()) { items.add(tile.getItem().getStackInSlot(i)); } } if (items.containsAll(recipe.catalysator)) { }
  19. List<ItemStack> items = new ArrayList<ItemStack>(); for (int i = 0; i < tile.getInventory().getSlots(); i++){ if (!tile.getItem().getStackInSlot(i).isEmpty()){ items.add(tile.getItem().getStackInSlot(i)); } } if (items.containsAll(recipe.catalysator)) { // TODO }
  20. I'm pretty sure we do Java here, not other Programming Languages
×
×
  • Create New...

Important Information

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