• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hi, I created a RightClickEvent to allow the player to strip my modded wood by right-clicking it with an axe. The problem is that if the player also has an item in their off-hand (e.g. dirt), that one is also used after the wood is stripped (e.g. the dirt is placed). The cause seems to be that the event is always for both hands (twice for each), even if one has already changed the result. I've tried every combination of setting event.useItem/useBlock/result to ALLOW/DEFAULT/DENY and calling event.setCancelled() but nothing helped. At the beginning of the method, event.getResult() always returns DEFAULT, so a special case there also doesn't help.   My event is defined as: @SubscribeEvent public static void centeBlockStripping(PlayerInteractEvent.RightClickBlock event){ LOGGER.info("Event hand: "+event.getHand()); if(event.getItemStack().getItem() instanceof AxeItem){ if(event.getWorld().getBlockState(event.getPos()).getBlock() instanceof CustomLog) { stripWood(...); damageAxe(...); event.setResult(Event.Result.ALLOW); event.setUseItem(Event.Result.DENY); event.setUseBlock(Event.Result.DENY); } } } and every time I right click a block, the event is fired twice for each hand. Log:  What am I doing wrong? Cheers  
    • Seems like it sorted itself out after a PC restart.
    • After clicking installer I just get stuck on the ad screen and the only button to show up is “Create forge server”. I want to run mods but can’t without forge 
    • When I try to install any version of forge it is unable to skip. The only button to show up is “create forge server”. I need help I want to run mods   
    • I'm trying to make a new custom entity but I still get the white cube. Here's what I'm doing. -I build my GrassmanModel by extending a BipedModel, and call the super constructor with the right parameters, as well as the super render. -in the render (extending LivingRender) I super construct with EntityRendererManager as a param - in this class I also get the texture and create a render factory. -In my client proxy during the FMLCommonSetupEvent, I render my entity rendering handler with parameters of my grassman entity class and a new grassman render factory. -In my common registry events class I register my entity as I see fit. -Also, in my Entity Init I of course initialize my grassman.   The texture is a renamed Zombie texture, with the exact pixels replaced with my grassman texture - its size is kept at 64x64 like what it's based on.   Still getting a white cube when I /summon. Why? I know this is a really complex issue, but I was hoping someone could help.   My code: GrassmanModel https://pastebin.com/qcYaS7UE GrassmanEntity (kind of a mess in terms of AI but shouldn't affect the render) https://pastebin.com/mvVtFevm GrassmanRender https://pastebin.com/LZsewnfb InitEntity https://pastebin.com/BpBxXJqk ClientProxy https://pastebin.com/3i8KaHzz Main mod class https://pastebin.com/frvi0DzF
  • Topics

  • Who's Online (See full list)