Everything posted by Differentiation
-
[1.12.2] Capability data resets after logging out and back in
I'll just upload the necessary files to the Git, since the whole thing will take days.
-
[1.12.2] Capability data resets after logging out and back in
I'm positive that they are
-
[1.12.2] Capability data resets after logging out and back in
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.
-
[1.12.2] Capability data resets after logging out and back in
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).
-
[1.12.2] Capability data resets after logging out and back in
*link*
-
[1.12.2] Capability data resets after logging out and back in
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!
-
[1.12.2] Canceling Player Knockback?
Hey, Is there any way to cancel player's knockback? Perhaps some event I need to cancel? Thanks!
-
[1.12.2] Custom Message on Player Join [SOLVED]
I'm using EntityJoinWorldEvent.
-
[1.12.2] [SOLVED] How to print ActionBar text for a specific player?
Thanks!
-
[1.12.2] Custom Message on Player Join [SOLVED]
1 Check if the entity instance is an EntityPlayer. 2 Check for client side. 3 What Jabelar said, too.
-
[1.12.2] [SOLVED] How to print ActionBar text for a specific player?
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!
-
[1.12.2] Registering Items and Blocks?
So it's just as simple as this?: @SubscribeEvent public void registerBlocks(RegistryEvent.Register<Block> event) { event.getRegistry().registerAll(block1, block2, ...); }
-
[1.12.2] Registering Items and Blocks?
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!
-
I'm having difficulty learning to mod for 1.12
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.
-
Player Capabilities on Server
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.
-
[1.12.2] [SOLVED] Checking if a player is OP?
PlayerList::canSendCommands(GameProfile... profile)
-
[1.12.2] [SOLVED] Checking if a player is OP?
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!
-
[1.12.2] [SOLVED] Getting player by String in ClientChatRecievedEvent?
I already had that method in the proxies, I just forgot it's there to my disposal
-
[1.12.2] [SOLVED] Getting player by String in ClientChatRecievedEvent?
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")?
-
[1.12.2] [SOLVED] Getting player by String in ClientChatRecievedEvent?
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!
-
PatronaMC ||| HARRY POTTER ||| Looking for Staff and builders |||
Cool!
-
[1.12.2] Test if Inventory contains multiple Items
Purge the page (reload)
-
[1.12.2] Test if Inventory contains multiple Items
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)) { }
-
[1.12.2] Test if Inventory contains multiple Items
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 }
-
[1.12] Custom item in all tabs
I'm pretty sure we do Java here, not other Programming Languages
IPS spam blocked by CleanTalk.