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

ZemahZalek

Members
  • Posts

    15
  • Joined

  • Last visited

Recent Profile Visitors

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

ZemahZalek's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I believe I have installed it correctly now. Is there a way to know it's working? I'm not sure of changes that can be made to the code during runtime when using DCEVM.
  2. Should I follow these steps: https://liferay.dev/blogs/-/blogs/java-classes-instant-reloading-using-dcevm-hotswap-agent to set up the DCEVM JDK, or just download the DCEVM (from the same link) and use that as the SDK?
  3. Interesting. Is there a way to apply this to my project? Anywhere I can input the arguments?
  4. Ah, of course. I'm stupid, sorry. Thanks for the help!
  5. I'm just wondering if there is a way to develop a mod during runtime? It's quite annoying to restart Minecraft every time I need to change something small. I tried changing textures for a single block, rebuilding the project and then refreshing the textures (F3 + T or whatever the command was) but instead IntelliJ gives an error (something about access denied) and all items and blocks included in the mod lose their textures (even the textures I never touched). Is is possible? And if so, what is changeable during runtime?
  6. Well sure, I can override the Block method and its fine. But what is the whole deal about using the method from BlockState instead if all we need to do is override the Block one?
  7. Well I shouldn't use the onBlockActivated from Block as it is deprecated. But at the same time I cannot access and override the one from BlockState because my block class isn't a subclass of BlockState. So how do I override a method I do not have access to?
  8. I simply want to set up basic functionality when right clicking on a block. And the infinite loop makes sense, however I have tried to create my own method and call the BlockState method from that but it doesn't work. Probably because my method is never getting called anywhere, so I don't know how to go about this.
  9. public class ModBlock extends Block { @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { return super.onBlockActivated(state, worldIn, pos, player, handIn, hit); //return state.onBlockActivated(worldIn, player, handIn, hit); //return this.getBlock().getDefaultState().onBlockActivated(worldIn, player, handIn, hit); } } Here is the onBlockActivated method in my own block class. The two commented lines are the ones I tried, but they resulted in a crash; java.lang.StackOverflowError: null. I guess it's because the BlockState parameter hasn't been instantiated yet? I just don't know how to access the BlockState method.
  10. The onBlockActivated method in the class Block (along with many other methods) are deprecated, however I need to call them. I read that I need (or should) use this same method but from the class BlockState instead and not use the deprecated one. However I do not know how to access this method. My own block class is a subclass of Block and therefore cannot also be a subclass of BlockState to access the method . The deprecated method in Block has a BlockState parameter but whenever I try to access onBlockActivated through that parameter the game crashes when I right click on my blocks. I also tried to get the blockstate through getBlock().getDefualtBlockstate() but that also resulted in a crash. Is there a specific way to to this? Or should I just use the deprecated method anyways?
  11. Worked wonderfully. Searched so long on all kind of websites and couldn't find anything that actually worked the way it should. Thank you so much! A follow-up question if you don't mind; is there a website or archive where you can learn about the different classes and methods in Minecraft and their functionality? With examples maybe? Because, like I said, I would never have found this solution on my own. I didn't even find anything on the web mentioning the class Screen.
  12. I recently got into Minecraft modding and I think it's alot of fun. I have created a block and added a tooltip to it through overriding the addInformation method. However, the tooltip is always showing while hovering the mouse over the block (as it should). I want it to only show when the user is holding down shift; like it is in most other mods (the tooltip says something like "Hold shift for more information" until you actually hold down shift and it shows the whole tooltip). Is there an effective way to to this? Another method or a boolean I have to change maybe? Thanks for all help.
×
×
  • Create New...

Important Information

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