Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/05/20 in all areas

  1. Before asking questions, please do some searching of your own: most things can be found in the sources or in guides/tutorials. See World#getChunkAt(BlockPos) to get the chunk for a specific position. World#getChunk(int, int) takes the two int values as coordinates for a chunk, not x and y positions for a block ([0,0] is the chunk encompassing [0,y,0] to [15,y,15]).
    1 point
  2. Try changing the ForgeFlowingFluid.Properties as well. In particular, the tickRate which affects how fast the fluid appears to flow. See how LavaFluid is setup to match.
    1 point
  3. But I'm not sure if you can use that information during mod loading.
    1 point
  4. I think you should look at ForgeRegistries. There you can get all registry entries. Example: ForgeRegistries.BIOMES.getEntries() gets all biomes.
    1 point
  5. Yes, you should, modding isn't a good way to learn Java, get used to the language before trying to make something, think about trying to write a book in a language you aren't familiar with.
    1 point
  6. Looking at the code for World#playBroadcastSound leads to WorldRenderer#broadcastSound, which calculates coordinates based on the given position and the player's PoV pos (I think?), which eventually just calls ClientWorld#playSound. Based on this, I recommend that in your packet, change from ISound to SoundEvent (+ pitch & volume), and copy the coordinates code from WorldRenderer#broadcastSound, and calling ClientWorld#playSound(double, double, double, SoundEvent, SoundCategory, float, float, boolean).
    1 point
  7. The write in Itemstack is something that writes an itemstack in a nbt tag iirc. What you are looking for should be either create a new CompoundNBT or getTag from the itemstack and use compound.putInt()... putBoolean... etc
    1 point
  8. Hi A working example is here https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe08_itemgroup -TGG
    1 point
  9. Maybe this'll help, thought of it immediately after seeing this.
    1 point
  10. Howdy I'd suggest your entity unloading is the way to go - perhaps Entity.remove() or Entity.onRemovedFromWorld() override, perhaps you can mark the Entity in some way to kill it permanently, and respawn a new one to emerge from the hive. Or after the entity unloads your hive block could track a virtual bee for a while and then respawn it with some logic to make it head towards the hive for a while. I'm not sure that there is an "unload event", but perhaps PlayerEvent.StopTracking will work how you need. I think the only way to make it truly seamless is to have a central bee controller instance which comes into existence whenever a hive or one of its bees loads. Every few server ticks, the bee controller reviews its list of virtual bees, calculates their movement and location, and spawns or despawns them as necessary within a given radius of the player (eg the render distance). Might not be worth the effort from a gameplay point of view. -TGG
    1 point
  11. Update Regarding LTS System: Please read The Big Forge Update Earlier this year, 1.13 was announced and the snapshots started coming out, the update was relatively small, but enough to be a hurdle for mod developers. This combined with 1.12 stabilizing, and a few fundamental Java changes that broke modding in general, made the Forge team decide to use this opportunity and work on cleaning the years of technical debt that Forge had accrued. During this time, it was discovered that a lot of things needed updating. In fact, well, everything did. And so, it was done, a full rewrite of practically everything Forge related. This took a long time, longer than originally anticipated. But what’s the outcome of this you might ask? A lot. cpw’s mod launching system (ModLauncher) allows for parallel mod loading and support for more modern Java versions. (Considering the original was written to target Java 6). The Forge installer now runs tasks at install time once, rather than doing it every time you run the game. These alone provide dramatic reduction in launch times. ForgeGradle, the “devkit” for creating mods, has been rewritten and is faster at, well, everything. It also integrates much better with IDEs. What does that mean, you ask? Simple. Mods are nicer to make. (Also 100% less setupDecompWorkspace.) MCPConfig allows for much easier MCP updates, and is public source too, so people can see exactly what's going on between updates. In short: There was a lot of work to do. And now that it's done, future updates will be much, much smoother. 1.14 and 1.15 The 1.14 release came around, just in time for the rewrite to be finished, so it was time to get the ball rolling again. The bulk of the restructure work was done through 1.13's life, so all that remained was actually seeing how it was to update all of it, and it went pretty well. A lot of improved systems exist now that make developing for these modern versions far easier and just better in general. The 1.15 release was relatively simple, even if Mojang decided to restructure everything and make changes to how the rendering works. (Taking some of our systems in the process, don't worry, this is a good thing.) 1.15's rendering changes were mostly a refactor, and we expect 1.16 to be a large update to rendering. This plus 1.14 seeing growth is why we chose 1.14 to be a candidate for LTS. (More on that further down.) Hopefully this kind of restructure from them is a rare thing in the future, but we welcome the change, since it often brings improvement. Although the rendering changes may pose a tough hurdle for some, the update for most should be relatively straight-forward. Forge support and LTS Forge's support for Minecraft versions will try to follow a predictable cycle, assuming Mojang also follows a predictable cycle. We will always actively target the latest Minecraft version, as ever. We will now also deem a previous major Minecraft version as "LTS" (Long Term Support). The LTS version will receive support for modders and players alike, however all new features must target the latest version first, and then may be backported. An LTS version differs slightly from the latest version, in that any new features you may want to add to it, must target the latest version, only once it has been merged in, can it be backported. (The exception to this is if the feature is non-applicable to the latest version.) The Forge Team will also mostly be focusing on the latest. This is so the community has time to stabilize a bit and gives modpack developers some time to create something special. But still have Forge running full steam ahead. Late last year (Happy 2020!) a vote was held privately with many developers of various Minecraft projects to determine which version will be LTS: Should 1.12 remain LTS or should 1.14? A vast majority chose 1.14, and so, from now on we are dropping 1.12 from support, and 1.14 is now LTS. What does this mean? 1.15 is latest. It will get full support. 1.14 is LTS. It will also get support, and new features, but new features must be made for 1.15 first. 1.12 is no longer supported on this forum, no new features, and no more bugfixes. All other versions are not supported. This means if you come to us for help with those, we will ask you to update. This includes crashes/bugs. To keep with Mojang's history of releases, we expect 1.14 to stay LTS for 12-18 months, giving plenty of time for modders and pack developers alike. However, this may change depending on what surprises Mojang has in store for us. Finally… Thank you. Thank you to all the modders/developers, all the players, and especially to all the contributors. The Minecraft modding community would not be what it is without you. You are responsible for the striving ecosystem we have today. We hope this new year brings you all you desire, and we look forward to seeing what you create. And now time for some shameless plugging, if you like Forge, please consider supporting us. http://www.patreon.com/lexmanos - The Forge Team.
    0 points
×
×
  • Create New...

Important Information

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