Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

urbanxx001's Achievements

Creeper Killer

Creeper Killer (4/8)



  1. Ah ok that makes sense, I should've looked closer at the list of loot conditions. Thanks!
  2. I have a loot modifier that updates all loot tables to drop specific items when using certain tools. Or at least I thought it did. It works on blocks, but not for entities. However I've tested it with the condition "killed_by_player" and that works for entities, the problem is testing these conditions together fails: So then I tried creating a custom ILootCondition, which registered fine but still failed: If anyone has advice I'd be very appreciative.
  3. As the title says, I was wondering what the updated method/process for addScheduledTask is. I need this for an event similar to: @SubscribeEvent public void onEntityJoin(final EntityJoinWorldEvent event) { Minecraft.getInstance() //(not recognized)--> .addScheduledTask(new Runnable() { @Override public void run() { } }); } For the FML setup event I've used: event.enqueueWork(() -> { } But I'm not sure what's required for a simple event. The context for this is collecting what language the client is using and then sending a packet to sync with the server. But the packet must be delayed or it fails in this event. Edit: Actually I can do the same thing when the player loads a container needing it. So the event's probably unnecessary
  4. Edit: I figured it out, thanks to Poopoodice's answer in another thread saying that online mode in server properties must be set to false. This was required because I received an invalid session error after attempting to join the server.
  5. Of course this is your thread and we're here to help you. If the place you're trying to access the items is a part of the inventory object (the block, tile entity, container, etc. classes) then it's easier. But if you're still in the process of creating your inventory, I'd suggest any of the following: -Forge docs on Tile Entities -Minecraft By Example topics. -Examine the source code for objects like Chests. Outside of block/TE/container, an easy way is the player's containerMenu value that I mentioned before, which is whatever menu is currently open: Container container = player.containerMenu
  6. Sorry, yes Luis is right it's just a helper function for resourcelocation: public static ResourceLocation getLocation(String name) { return new ResourceLocation(MOD_ID, name); } As he and diesieben said though, if it's a simple problem like calling openGui and registering the screen, then packets are unnecessary, but you need to describe it in more detail.
  7. The inputs are just a template- in this case it's two strings, but they can be ints, chars, etc. or none at all, depending if you need to initially send info across sides. I'd suggest reading Forge's documentation on packets first if you haven't used them before: Forge Docs Networking You usually send the packet by invoking handler methods: ModPacketHandler.sendToServer(new C2SPacketForContainer(input1, input2)); Where the handler class has packet registration and the methods: The register methods are called in common setup.
  8. Yeah the VillagerUtil was used in conjunction with the POI Forge registry, but you're right it's superfluous and I should stick with the simpler way. Thank you Ash
  9. To begin where are you trying to access info for the container? From the server or client? If it's the latter you'll need to send a C2S packet. Then the easiest way to collect info is when the player opens the inventory, since they have a containerMenu variable. The packet would look something like:
  10. Ah ok glad you found a solution. For the Start sub class of LivingEntityUseItemEvent, cancelling it or setting duration <= 0 should prevent it as well.
  11. I'm not sure how the change in platform is causing the error, but your best bet would be to create a fresh environment on your Mac and then copy all the class files over if you haven't already
  12. So I'm nearly finished with a version of my mod and, although I haven't done mapping changes in awhile, I'm confident that I have the correct MCP name so that an instance of reflection runs properly. However, the new method name isn't recognized during load in the real environment (I'm aware it needs to be changed back to run in dev). I cross-referenced both the output.srg as well as a Discord bot and they tell me that: func_221052_a in PointOfInterestType.class should be registerBlockStates Attached is the relevant class and log file. Any help is appreciated. Loading Output Log Villager Util class:
  13. Here's the class for attempt 1. For attempt 2 I've also tried assigning random UUID's and/or random modifier names for each item instance, but they still remain linked.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.