• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Thank you for helping.I tried searching error with different keywords and found solution. I run clean and it is working now. I dont know why but it is working. Also how can I close this topic or mark as solved?
    • It does not say anything about ascii characters. It gives a specific set of characters which are allowed. It also tells you exactly where it found one that is not in the set of allowed ones.
    • You need to use the SRG name, this won't work outside the development environment.   What...? What... Just... what is this?   This will crash on a server, as the server has no idea about the Minecraft class.   Client-only events must be in a separate @EventBusSubscriber class with Dist.CLIENT passed to @EventBusSubscriber.
    • I cant understand how do I need to find error with that. I runned debugger for mdk and error was creating resource named "DUMMY" so I think it wasnt my mod that causes error. Also I checked my resources and I dont have non ascii characters
    • I believe this new version covers everything you said. I used an attached player capability for the boolean. private static final Field field = ObfuscationReflectionHelper.findField(Minecraft.class, "rightClickDelayTimer"); @SubscribeEvent public void onClientTickEvent(TickEvent.ClientTickEvent event) throws IllegalAccessException { if(event.phase == TickEvent.Phase.START) { try { if(CustomCapabilities.getPlayer(Minecraft.getInstance().player).getVariable("string", "HasBrokenMyBlock").equals("true")){ field.setInt(Minecraft.getInstance(), 0); CustomCapabilities.getPlayer(Minecraft.getInstance().player).setVariable("HasBrokenMyBlock", "false"); } } catch (NullPointerException e) {} } } @SubscribeEvent public void farmBlock(PlayerInteractEvent.RightClickBlock event) { if(event.getPlayer() == Minecraft.getInstance().player){ if(event.getPlayer().getHeldItem(event.getHand()).getItem().equals(Items.SHEARS) && event.getWorld().getBlockState(event.getPos()).equals(RegistryHandler.MY_BLOCK.get().getDefaultState())){ CustomCapabilities.getPlayer(event.getPlayer()).setVariable("HasBrokenMyBlock", "true"); } } }   Everthing works, but a server instance isn't running because it doesn't like the ClientTickEvent: "Attempted to load class net/minecraft/client/entity/player/ClientPlayerEntity for invalid dist DEDICATED_SERVER"   Tried to use regular TickEvent and it gave me the same error.
  • Topics

  • Who's Online (See full list)