Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/10/19 in all areas

  1. I had been using Eclipse for too long before I switched to IntelliJ this year, and I absolutely love IntelliJ. It has a neater environment, offers more tools, and generally speaking, is more professional. However I do miss something from Eclipse. While on debug mode, you could just edit the classes, save them, and the changes would pop right into the game. A very nice tool to have, especially when working with models and such because you can see what's going on right away without needing to restart the game every time you make a change. IntelliJ kind of has the same thing too and they call it HotSwap, but it feels a little sluggish compared to Eclipse. I have to do the process manually by hitting the "Reload Changed Classes" and it actually takes longer to update the game. Also, sometimes it doesn't even change anything in-game and that's where it gets a little annoying, especially for me right now that I am working on a model. I had to refresh the game everytime I made an adjustment because HotSwap couldn't update it while on debug mode and I wasted an hour trying to get everything to look right. Is there a way to make the IntelliJ debugger work like the Eclipse debugger? It would really help out to save some time.
    1 point
  2. Agreed, Tabula and other utilities make it so much easier to position and tweak things on the fly. Trial and erroring semi-abstract numbers is a massive waste of time. However, there's a useful feature many are unaware of that most IDEs can use to alleviate similar issues: hotswapping. I don't know how to do it on Eclipse, but on IDEA you can simply launch the game in debug mode, change some code, then just hit the build button to hotswap the changed code into the running game. It can't do everything (e.g. adding/removing methods requires a full restart), but changing rendering code inside a method is an ideal use case for this feature. But with that said, I sadly don't think hotswapping will work for adding/changing model boxes since those are usually defined in the model's constructor. Workarounds are possible (does anyone know if F3 + T also reloads entity models?), but Tabula/Blockbench is still the way to go to get fast results.
    1 point
  3. Here's one: placing the box and texture blind directly into code and only being able to see what it looks like by loading up the game each time is a pain in the ass.
    1 point
  4. You need to show your code. CANNOT help if you dont. Show your UnicornEntityModel class first.
    1 point
  5. Just read the names of the parameters. The first three are the center position of the box, then size of the box, then the scale. Read some of the vanilla code to see some real usages.
    1 point
  6. I haven't tried making one myself yet, but someone posted this link not too long ago: https://gist.github.com/Commoble/ac7d7b57c9cbbfcae310c4ab110c3cc0 Hope that helps!
    1 point
  7. So, it was brought to my attention that the way that I am teleporting the player using commands seems to cause some rather bad happenings on the server. When I first tried it, after they found the issue, I tried to teleport from the overworld to the end. When I did it had me suspended in what looked like the end, but nothing was loaded, no blocks could be seen, I couldn't move, nothing. Eventually my client disconnected, and then when I tried to log back in the server crashed saying that the server took a 60 seconds for a single tick. The way that I am attempting to teleport the player is just like how they do it in minecrafts code (pulled from the end portal block code) entityIn.changeDimension(worldIn.dimension.getType() == DimensionType.THE_END ? DimensionType.OVERWORLD : DimensionType.THE_END); What I am doing is this: public static void teleport(ServerPlayerEntity player, Location loc) { PlayerData data = Main.database.get(player.getUniqueID()); data.prevLoc = getPlayerLocation(player); BlockPos pos = loc.getBlockPos(); if(!player.dimension.equals(loc.getDim())) { if(Main.isDev()) { player.changeDimension(loc.getDim()); }else { TextUtils.err(player.getCommandSource(), "The ability to teleport between dimensions has been disabled until it can be fixed."); return; } } player.setPositionAndUpdate((double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D); } I feel like something I am doing must be the issue, it is normally the reason, but I was fairly certain that this would work.
    1 point
  8. The registry system has been overhauled in 1.12, you need to use registry events. Forge's documentation explains them here. You can see some examples in my mod's init classes. Unlocalised names should not be used for anything except display/translation purposes, use the Item's registry name (IForgeRegistryEntry#getRegistryName) as the default model location (since it's the default model that vanilla loads for every Item). Use ModelLoader.setCustomModelResourceLocation/setCustomMeshDefinition rather than ItemModelMesher#register to register Item models. Do this in ModelRegistryEvent. The tutorial you followed is outdated and poorly written. None of this is new to 1.12; ModelLoader was introduced in 1.8, registry names were introduced in 1.8.9, IForgeRegistryEntry was introduced in 1.9, registry events were introduced towards the end of 1.10.2.
    1 point
  9. Can you? Absolutely. Should you? Avoid ASM like the plague. Better yet, avoid the plague like ASM.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.