warjort
Members-
Posts
5420 -
Joined
-
Last visited
-
Days Won
175
Everything posted by warjort
-
My Minecraft Keeps Crashing When At 1% While Loading Worlds
warjort replied to PriBreaks's topic in Support & Bug Reports
Looks like this issue: https://github.com/sp614x/optifine/issues/6974 Temporary workaround is said to be use forge 40.1.57 Always try removing optifine if you have strange bugs. It will probably fix it. ๐ -
The mod that springs to mind for me is: https://github.com/BlakeBr0/ExtendedCrafting
-
(1.18.2) Forge not loading or even opening
warjort replied to mask3d_owo's topic in Support & Bug Reports
The end of your log says it set the user fine, the last thing in the log is initializing the graphics. You really need to post the logs/debug.log so we have the full information. But an error at this point usually means a problem with your graphics driver (check it is up-to-date) or your monitor settings. What error code does it tell you in the launcher? Also, look for a file starting with "hs_err_pid" in your minecraft folder, that would show the error if it crashed in your graphics driver. -
Ok, that respawnPosition is not what you think it is. It is It lets a block decide where to place the player if they happen to respawn at that block.
-
You can't just teleport somebody to their spawn. The location might be in a different dimension. Which needs special handling. In the vanilla code, this is only done when the player dies which effectively creates a new player as they respawn.
-
What is the code you are showing? The ServerPlayer.getRespawnPosition() method looks like this public BlockPos getRespawnPosition() { Note: the result maybe null if the player hasn't set their spawn.
-
Yes, its looks like a bug to me. Its actually only kind of related to the dimension. The forge code has an optimisation beyond vanilla that checks if the "target block" is actually loaded into the world before doing anything. https://github.com/MinecraftForge/MinecraftForge/blob/05297fd72fa99e9ff020fee3ee365ad51bcaf8f0/src/main/java/net/minecraftforge/common/ForgeHooks.java#L1106 The issue is, it looks like this check is getting used before the block has been determined. So it is checking if 0,0,0 is loaded. This usually will be for the overworld (spawn chunks) but might not be in the nether. It works for me at 0,~,0 in the nether, but not at 1500, ~, 1500 This will be why it works in a different world for you, 0,0,0 is loaded there. Report bugs here: https://github.com/MinecraftForge/MinecraftForge/issues
-
err... ๐ ServerPlayer.getRespawnPosition() but you will also need ServerPlayer.getRespawnDimension()
-
Didn't exist in 1.18.2 it was hardcoded. See the 1.19 release notes for the change: https://feedback.minecraft.net/hc/en-us/articles/6731464524941-Minecraft-Java-Edition-1-19
-
Requesting An Example of the code of a Custom Projectile
warjort replied to Tadpoling's topic in Modder Support
NOTE: I wrote "? extends ProjectileCopy" in case you want a subclass in future, otherwise it can just be ProjectileCopy. -
Requesting An Example of the code of a Custom Projectile
warjort replied to Tadpoling's topic in Modder Support
The other constructor that takes a Llama as a parameter, you obviously don't need. Unless you want to do something similar to Llama.spit() but then it won't be a Llama for your projectile. -
Requesting An Example of the code of a Custom Projectile
warjort replied to Tadpoling's topic in Modder Support
First, please don't post code in images. Either paste the code snippets using the <> option or put your code on github if it is large. Your question is a misunderstanding of lambdas again, like with the BlockEntity problem you had. But this time with generics. Your constructor needs to mention the actual entity class as the generic parameter, not Entity. public class ProjectileCopy extends Projectile { public ProjectileCopy(EntityType<? extends ProjectileCopy> entityType, Level level) { -
[1.19] Custom painting not showing up in the rotation
warjort replied to Oksas's topic in Modder Support
This change is documented here (search for paintings): https://feedback.minecraft.net/hc/en-us/articles/6731464524941-Minecraft-Java-Edition-1-19 -
[1.19] Custom painting not showing up in the rotation
warjort replied to Oksas's topic in Modder Support
You need to add your painting(s) to the painting_variant placeable tag Add the following tag file to your mod: src/main/resources/data/minecraft/tags/painting_variant/placeable.json with the contents (check I have this correct). { "values": [ "mass_effects_mod:bcs_painting", "mass_effects_mod:bcs" ] } You can also create this file using datagen if you want. https://forge.gemwire.uk/wiki/Datageneration -
There are some "hidden" limits which you might hit. e.g. StringTag.write() uses DataOutput.writeUTF() which has this in its javadoc
-
Requesting An Example of the code of a Custom Projectile
warjort replied to Tadpoling's topic in Modder Support
Projectiles are just special Entities that extend the Projectile class or one of its subclasses like AbstractArrow. So tutorials for creating entities will get you a lot of the way there. e.g. registering your EntityType and EntityRenderer For the actual implementation, look at one of the vanilla projectiles or a mod that does something close to what you want. -
The SoundOptionsScreen will show you how to code the Slider. To actually modify the screen you will need to register for forge's ScreenEvent(s) in your FMLClientSetup. For example, you can respond to the Init.Post event by checking if it is the PauseScreen then adding your slider. Your problems are probably going to be: * Some other mod does the same thing and you end up drawing over each other * Somebody runs the game in large gui mode and your slider doesn't fit on the screen So you may want to be intelligent about where you add your slider, based on for example what widgets are actually on the screen.
-
Your actual error is This is a Mojang DataFix that looks to be related to changes made in 1.18.2 to support the new feature: https://www.minecraft.net/en-us/article/minecraft-java-edition-1-18-2 So there is probably something about the modded structures in your world save from 1.18.1 that does not follow the vanilla format and so can't be fixed. There would have been no standard format for this before the feature was added in 1.18.2 There is also these warnings: The only thing I can suggest is to identify your worldgen mods that add structures and talk to the mod authors. They may have a solution to this problem?
-
I am not sure what you are describing? There are particle effects produced while the fire is burning. I don't see any when the block is destroyed? There is a Level.levelEvent() for event 1009 in BaseFireBlock.playerWillDestroy() which ends up in LevelRenderer.levelEvent() that plays the fire extinguish sound(s). A word of warning. You should be careful with this kind of thing. Not everything is OOP. e.g. search the codebase for references to (Base)FireBlock or Material.FIRE and you will find old legacy hardcoding. There is also the more modern BlockTags.FIRE, which I guess you want to add your block to.
-
Edit Forge Loading Screen with ModCode in 1.18.1
warjort replied to FedeT_'s topic in Support & Bug Reports
You can find many mods that do this on curseforge, an example search: https://www.curseforge.com/minecraft/mc-mods/search?search=loading+screen "loading screen" can mean loading a world or loading the game, so make sure you have one that does what you want. -
Nope sorry, I a think I am confusing two different things. The code to draw the hitbox is in LevelRenderer.renderHitOutline.
-
Doesn't that only get used to custom draw the "hitbox" of the block the player is looking at? @diesieben07 Now I know why you didn't want people using the old gui overlay event, it's all changed in the latest version. ๐ I would say you want to register for RenderGuiEvent.Pre to make sure you are drawing before the HUD gets displayed. Then do something similar to the vanilla hitbox code in ScreenEffectRenderer.renderScreenEffect(), the renderTex() code. Except instead of using getOverlayBlock(Player), you use your block's BlockState and BlockPos.
-
I am not really following what you are asking? Let me "guess". You have a custom recipe, but you also want to reference "standard patterns". By standard patterns do you mean ShapelessRecipe and ShapedRecipe used by the vanilla crafting station? If you want to understand how the vanilla crafting table works look at vanilla's CraftingMenu, CraftingScreen and their related classes. In particular CraftingMenu.slotChangedCraftingGrid() is where it uses the RecipeManager to locate recipes of RecipeType.CRAFTING