Everything posted by warjort
-
Destroy / Remove blocks (10x10x10) when the block is clicked with an item.
https://stackoverflow.com/questions/214714/mutable-vs-immutable-objects Doing lots of new operators in a short time will create lots of garbage which can stress the garbage collector if you do it too much. Its the kind of thing you might not see in development with only 1 user, but will be more of a problem as you try to scale up.
-
game keeps crashing when trying to create a new world
https://github.com/sp614x/optifine/issues/6974
-
Having problems with configured features registry data
The error says your ConfiguredFeature isn't registered. You can test if that is true in your FMLCommonSetUp. Most likely the static register(IEventBus) isn't getting invoked or the bus value is wrong?
-
Destroy / Remove blocks (10x10x10) when the block is clicked with an item.
I think your problem is your iteration logic is wrong. You need to reset after each inner loop. Your logic as it stands moves south 3, then up 1 then south 3 again, then up 1, you see the problem?
-
Destroy / Remove blocks (10x10x10) when the block is clicked with an item.
To take advantage of the mutable you want code more like: BlockPos.MutableBlockPos blockMutable = new BlockPos.MutableBlockPos(x, y, z); for(int i = 0; i < 3; i++) { for(int ii = 0; ii < 3; ii++){ for(int iii = 0; iii < 3; iii++){ level.removeBlock(blockMutable, true); blockMutable.move(Direction.SOUTH); } blockMutable.move(Direction.UP); } blockMutable.move(Direction.EAST); } If you look at the BlockPos class there are static methods such as betweenClosed() that let you create iterables or streams for different shapes. These methods use a MutableBlockPos internally.
-
[] dual door how to ignore or avoid triggering updateShape() when changing the state of open/close attribute
Here's an old forge class which used to hold the values for the flags in Block updates. WARNING: This class was removed so some the values may be out-of-date? You will need to check the actual minecraft code if it doesn't do what it says there. https://github.com/Wyn-Price/MinecraftForge/blob/4f3b02c2df17119538c5cd91a8eb8302cf187454/src/main/java/net/minecraftforge/common/util/Constants.java I would guess the Villager's ignoring the change is due to the BLOCK_UPDATE bit not being set? Since this is commented as "updates all pathfinders". I can't comment on the double doors updates. I have never looked at the code.
-
[1.18.2] Changing the sun and moon texture only in custom dimension
See the forge ISkyRenderHandler class, look at the javadoc. One place to do it is by subscribing to WorldEvent.Load and testing isClientSide() and ClientLevel.dimensionType() is your dimension. You can see how vanilla does the rendering in LevelRenderer.renderSky() In case it is not obvious, you need to cast the LevelAccessor to a ClientLevel after have tested you are client side.
-
[1.19] Screen point (x,y) to world coordinates (x,y,z)
I have zero knowledge about this stuff either. ๐ I do know you don't want to modify those internal matrices like you are. You should at least clone them. But I don't think they are what you want anyway. Take what is below with a pinch of salt! I would guess the matrix values you want are those used in RenderTarget._blitToScreen()? But even then this isn't going to help you. You don't know the depth of the block. The examples in the link assume you know the value or use z=1 (a point on the far plane). You probably really need to do some kind of depth test on the buffer at the clicked "pixel". I have no idea how to do that. Your better bet would to ask on the discord channel of one of the graphics optimisation mods. They will have a lot more knowledge about this stuff.
-
[1.18.2] How do you access statictics correctly in live time?
The REQUEST_STATS downloads all the stats. Repeatedly doing this in "real time" is going to be very inefficient. It is designed for the stats screen that only downloads the data once when you display that screen.
-
[1.18.2] How can I refer to a datapack biome during Mod init?
The biomes and other worldgen can be found in MinecraftServer.registryAccess(). You can't add to these registries after loading, they are frozen. I don't know why you want to? The objects are already clones of the builtin registry objects or made from "whole cloth" and are specific to that world save. Like I said above, there is a way to modify biomes during loading - BiomeLoadingEvent. If you have your own ChunkGenerator then you can make your own BiomeSource to choose which biomes to use.
-
"Failed to download version manifest, can not find client jar URL." error.
Update your java to a recent version.
-
[1.18.2] How do you access statictics correctly in live time?
Documentation for network packets is in the link I posted above. See the "Handling Information" section. ServerPlayer.getStats() does exist. It has the full signature (in net.minecraft.server.level.ServerPlayer) public ServerStatsCounter getStats() {
-
1.18.2 - intellij 2022 -Setup Dependencies from own Mod
Look at the examples in the mdk, in particular the comment above the dependencies that have fg.deobf that remaps the mod back into your choice of deobfuscation mapping You also need to specify the dependency in the mods.toml of the using mod, otherwise forge won't know the order to load the mods. https://forge.gemwire.uk/wiki/Mods.toml It is very hard to help you. I can tell you don't understand what is going is on, but the "random" and incomplete information you post means I have to try to guess what the problem is. If you have a problem, show what is not working, not your (probably wrong) description of what you think is happening.
-
Error de inicio de servidor
If c:\java\bin\java.exe is your java 17
-
1.18.2 - intellij 2022 -Setup Dependencies from own Mod
To use your mod as a dependency in a different project, your mod needs to be published to a maven repository. This can just be a local maven repository on your computer. There is a template at the bottom of the example mdk mod, but the relevant docs are the gradle ones. https://docs.gradle.org/current/userguide/publishing_maven.html
-
Error de inicio de servidor
Correct, there is only java at the start of the line. As I said above, replace where it says java with the full path to the java.exe in your java 17 installation.
-
[1.18.2] How do you access statictics correctly in live time?
ServerPlayer.getStats() then retrieve the stat you want. To access it on the client you will need to write your own network packet. https://forge.gemwire.uk/wiki/Main_Page A possible implementation is to subscribe for LevelTickEvent and check you are server side. Then check for changes for each player (MinecraftServer.getPlayerList) and send a client bound network packet to refresh the data when it changes. Alternatively, if this is a GUI screen you can just do what StatsScreen does. Implement the StatsUpdateListener and send the network packet (see the init method) when you want the data. This will send all stats so maybe not what you want for this use case?
-
Forge Crash when attempting to start the server on Multicraft
These look like bugs in the findme and mahoutsukai mods. They are trying to do mixins on graphics classes that are not available on the server. Make sure you have the latest versions of these mods. If you do, contact the mod authors to report the problems.
-
Error de inicio de servidor
On that command line type or it will likely say it is using the java 8 version If that is true you will need to change the .bat script to tell it to use the java 17 version. Replace where it says java with "c:\path\to\java17\java.exe" where the path\to\java17 is the folder where you have java 17 installed. The quotation marks are important if the path includes spaces.
-
Forge Crash when attempting to start the server on Multicraft
The error says the user profile that runs the server is not allowed to access config/fml.toml Most likely you tried at one point to start the server under the root profile which created files the normal user can't access. Fix the file permissions.
-
[1.18.2] How can I refer to a datapack biome during Mod init?
This description is going to be very high level and gloss over many details: Worlds (see WorldStem) are made up of dimensions/levels (see LevelStem). Within the LevelStem is a ChunkGenerator that has BiomeSource. this is what determines which biomes are in a dimension. If you look inside Terralith you will see it has a data/minecraft/dimension_type/overworld.json that is the configuration override for the vanilla overworld defined in the builtin registry. See https://minecraft.fandom.com/wiki/Custom_dimension for the format. It then defines a bunch of biomes jsons that are referenced in that overworld.json which will in turn reference other world gen components in the datapack. NOTE: This also includes tags to reference groups of biomes. See other pages on the same wiki for the formats. As you have determined this data is not loaded until the world creation screen (or first server load). The process is to load copies of the builtin registries then override these objects with the datapacks. The worldgen data is then stored in the world's save folder. This datapack data for worldgen are not referenced again on subsequent loads. It is fixed at world creation. I am not sure what you mean by "clone and modify" a biome. You can modify a Biome using the BiomeLoadingEvent, but this won't make a new one. To do that you need to provide a new resource from a datapack. One thing you are going to need to do is override terralith's overworld definition if you want new biomes in the overworld. This will likely involve you using the AddPackFindersEvent to add a new RepositorySource. This will define a pack at the "TOP" of the datapacks list (as seen from the create new world screen's datapacks button) which contains the new definition. It's a bit of a rabbit hole the way this works. ๐ You might find a simpler solution is to just write your own datapack? Forge mods are datapacks so its an easy way to install them.
-
My game crash when I start up the game. 1.18.2 WITH MODS (FORGE)
You are missing the AutoRegLib mod https://www.curseforge.com/minecraft/mc-mods/autoreglib
-
My minecraft crashes while trying to create a new world
In previous logs you had corail tombstone 7.4.10, now you have 7.4.2? Your error is with that mod:
-
[1.19] Check when the crafting matrix has a valid craft
Your proposed solution won't work - for interest you would implement it like this: @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class DONT_TRY_TO_USE_THIS { @SubscribeEvent public static void DOES_NOT_WORK(ScreenEvent.MouseButtonPressed.Post event) { if (event.getScreen() instanceof CraftingScreen craftingScreen) { CraftingMenu menu = craftingScreen.getMenu(); LOGGER.info("result: " + menu.getSlot(0).getItem()); // Prints the wrong thing! } } } I posted this, so you can see how to get the menu. The problem is the result has not been determined when you handle the mouse click. The game has to send a network packet to the server to ask if there is a valid recipe. The result of that query does not get updated on the client until *after* the mouse event. There is an ItemCraftedEvent, but that handles items removed from the result slot, which doesn't sound like what you want?
-
error -1 minecraft when creating a new world
https://github.com/sp614x/optifine/issues/6974
IPS spam blocked by CleanTalk.