Jump to content

warjort

Members
  • Posts

    5420
  • Joined

  • Last visited

  • Days Won

    175

Everything posted by warjort

  1. You can use this mod to login in a development environment. https://www.curseforge.com/minecraft/mc-mods/reauth If you don't trust it (you should be careful about where you enter your credentials), you can copy its code.
  2. Another solution would be to just not tick your block on the client. Looking at your code, I don't see a reason why you need to do this? Only ticking on the server would simplify your code and you wouldn't have to worry about sides. See AbstractFurnaceBlock.createFurnaceTicker() for how to create a block entity ticker that only ticks on the server.
  3. @Override public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { super.onDataPacket(net, pkt); } This is still redundant. Did you change the other code? You know your level.getBlockEntity(BlockPos) code is running on both the client and server? Doing it on the client is unsafe unless you check Level.isLoaded(BlockPos) first. But as I said, you shouldn't need to call that method since you already have the block entity as a parameter.
  4. public static void tick(Level level, BlockPos pPos, BlockState pState, TeleporterBlockEntity blockEntity) { -- snip -- if(level.getBlockEntity(pPos) != null && level.getBlockEntity(pPos) instanceof TeleporterBlockEntity) { ItemStack stack = ((TeleporterBlockEntity) level.getBlockEntity(pPos)).itemHandler.getStackInSlot(0); Why are you doing all this extra work? You are told the TeleporterBlockEntity as a parameter to this method. You still have this "broken" code, which I told you about on your previous thread but you obviously didn't fix it. @Override public CompoundTag getUpdateTag() { CompoundTag tag = saveWithoutMetadata(); // Why are you loading during the save? load(tag); return tag; } @Override public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { super.onDataPacket(net, pkt); // This calls load() load(pkt.getTag()); // so this is duplicate work - in fact the whole onDataPacket() method is redundant, you can remove it and use the default implementation } // This is redundant too, overriding a method and just calling super is pointless @Override public void handleUpdateTag(CompoundTag tag) { super.handleUpdateTag(tag); } When you've fixed your block entity load/save code and are sure it is working properly, either; * create a new test world * break all your BlockEntity blocks and replace them that way you will know there aren't blocks lying around with broken nbt data from your previous buggy code
  5. [03Sep2022 19:49:42.740] [main/FATAL] [mixin/]: Mixin apply failed hexplat.mixins.json:accessor.AccessorEntity -> net.minecraft.world.entity.Entity: org.spongepowered.asm.mixin.gen.throwables.InvalidAccessorException No candidates were found matching markHurt()V in net/minecraft/world/entity/Entity for hexplat.mixins.json:accessor.AccessorEntity->@Invoker[METHOD_PROXY]::hex$markHurt()V [INJECT Applicator Phase -> hexplat.mixins.json:accessor.AccessorEntity -> Apply Accessors -> -> Locate -> hexplat.mixins.json:accessor.AccessorEntity->@Invoker[METHOD_PROXY]::hex$markHurt()V] org.spongepowered.asm.mixin.gen.throwables.InvalidAccessorException: No candidates were found matching markHurt()V in net/minecraft/world/entity/Entity for hexplat.mixins.json:accessor.AccessorEntity->@Invoker[METHOD_PROXY]::hex$markHurt()V [INJECT Applicator Phase -> hexplat.mixins.json:accessor.AccessorEntity -> Apply Accessors -> -> Locate -> hexplat.mixins.json:accessor.AccessorEntity->@Invoker[METHOD_PROXY]::hex$markHurt()V] Looks like an issue with hexcasting. It might be conflicting with another mod. Contact the mod author.
  6. You can start by making your question answerable. A one line NPE completely out of context is useless. You don't even show the stacktrace - it needs more than that. I wonder if you even know where in your code this error happens?
  7. What/where is that tick() method? You are just showing some random code without any context. From the error message it looks like it is getting called on the client, since Level.getServer() is returning null. I would guess your other error (for which you don't even grace us with code) has the same problem. Forcing chunk loading is not necessary to solve your problem. Your problem is you can't reference chunks outside the render distance on the client. You shouldn't be doing this processing there.
  8. RenderLayers are just a way to break up rendering into more bitesize chunks. RenderLayer -> Renderer is as Widget -> Screen For the rest of your question, you can use your IDE to find all the vanilla implementations of RenderLayer and look at what they do. Many of these are for rendering carried items.
  9. No, it is you who is crashing the game. 🙂 You are not registering your ENTITIES DeferredRegister here: https://github.com/Tucky143/Crystal/blob/ad83381c1ba267a22d36d445b8d567ba8e387f5f/src/main/java/example/examplemod/init/EntityInit.java#L19 public static void register(IEventBus modEventBus) { ENTITIES.register(modEventBus); // ADD THIS } Read this: https://forge.gemwire.uk/wiki/Registration
  10. Looks like problems with the above two mods. I would guess the issues are: Missing geckolib dependency for farmlife: https://www.curseforge.com/minecraft/mc-mods/dracovita-farm-life/relations/dependencies Missing biomes o plenty dependency for macawsroofsbyg: https://www.curseforge.com/minecraft/mc-mods/macaws-roofs-biomes-o-plenty/relations/dependencies You also don't have the latest version of macawsroofsbyg: https://www.curseforge.com/minecraft/mc-mods/macaws-roofs-biomes-o-plenty/files/all?filter-game-version=1738749986%3a73250 If that doesn't fix it, you will need to post your logs/debug.log for us to see what the real problem(s) are. For curseforge you need to enable the forge debug.log in the minecraft settings.
  11. Do you really think this question is in anyway answerable? It's 2 lines of code without any context. My guess is you have the same or a similar problem to this: https://forums.minecraftforge.net/topic/114943-make-an-enchantment-specifically-for-a-shovel/#comment-509407
  12. You can see how that is rendered in Gui.renderCrossHair() using Player.getAttackStrengthScale()
  13. You don't need to write code in your block for this. You can use the CopyBlockState loot item function. See the vanilla code in BlockLoot.createBeeNestDrop() for how it remembers the honey level That code is more probably more complicated than you need since it; * Also copies some block entity nbt for the bees * Only drops the block when the player has silk touch.
  14. Your issue is you are using the blit method designed for 256x256 images. Since yours is a "nonstandard" size, you need to tell it the size of the image, e.g. this.blit(stack,x,y,0,0,this.width,this.height, 49, 20);
  15. You need cheat mode enabled to use the /summon command.
  16. Can you put your code on github so we can see all the relevant context. It should compile and run. You don't even show your updated code, let alone the other relevant code you missed from your first post.
  17. It's still in the same class. Its just the name has been shortened to remove redundancy. InputEvent.KeyInputEvent -> InputEvent.Key
  18. You could also ask the create developers to modify their RecipeSerializer to include the recipe name in their error message(s)?
  19. [19:34:00] [Render thread/WARN]: Failed to load datapacks, can't proceed with server load java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Can't modify the empty stack. at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?] -- snip -- Caused by: java.lang.IllegalStateException: Can't modify the empty stack. at net.minecraftforge.fluids.FluidStack.setTag(FluidStack.java:201) ~[forge-1.18.2-40.1.70-universal.jar%23208!/:?] at com.simibubi.create.foundation.fluid.FluidHelper.deserializeFluidStack(FluidHelper.java:126) ~[create-1.18.2-0.5.0.d.jar%2388!/:0.5.0.d] at com.simibubi.create.foundation.fluid.FluidIngredient$FluidStackIngredient.readInternal(FluidIngredient.java:180) ~[create-1.18.2-0.5.0.d.jar%2388!/:0.5.0.d] at com.simibubi.create.foundation.fluid.FluidIngredient.deserialize(FluidIngredient.java:131) ~[create-1.18.2-0.5.0.d.jar%2388!/:0.5.0.d] at com.simibubi.create.content.contraptions.processing.ProcessingRecipeSerializer.readFromJson(ProcessingRecipeSerializer.java:66) ~[create-1.18.2-0.5.0.d.jar%2388!/:0.5.0.d] at com.simibubi.create.content.contraptions.processing.ProcessingRecipeSerializer.fromJson(ProcessingRecipeSerializer.java:156) ~[create-1.18.2-0.5.0.d.jar%2388!/:0.5.0.d] at com.simibubi.create.content.contraptions.processing.ProcessingRecipeSerializer.m_6729_(ProcessingRecipeSerializer.java:22) ~[create-1.18.2-0.5.0.d.jar%2388!/:0.5.0.d] at net.minecraftforge.common.extensions.IForgeRecipeSerializer.fromJson(IForgeRecipeSerializer.java:23) ~[forge-1.18.2-40.1.70-universal.jar%23208!/:?] at net.minecraft.world.item.crafting.RecipeManager.fromJson(RecipeManager.java:157) ~[client-1.18.2-20220404.173914-srg.jar%23203!/:?] Your error looks to be a create recipe that has an invalid fluid definition. The error is probably not with create itself, any mod could define a recipe to be processed by create. But the error message does not say which mod/recipe is doing it. You should check your create addon mods to see if they are latest version. And also check their "issues" pages to see if this is already reported by someone else. Otherwise, probably the only way you are going to find the problem mod is by removing them one by one until the problem goes away.
  20. Remove rubidium and other broken client side only mods from the server. You don't need it there.
  21. https://github.com/sp614x/optifine/issues/7009#issuecomment-1228057896
  22. You already have an EntityRendererProvider. It is your EntityRenderer constructor. You just defined it wrong. Here's an example of a mod using geckolib. This is what its entity renderer constructor looks like: https://github.com/baileyholl/Ars-Nouveau/blob/eca471912263bce08f9f8f57ef132e45f18f7ff1/src/main/java/com/hollingsworth/arsnouveau/client/renderer/entity/AmethystGolemRenderer.java#L21 But if you are just going to copy/paste other people's code you will never learn how to mod.
  23. Your image tells you what is wrong. Your method reference is wrong. You need to be able to understand what the compiler is telling you, this is a java question not a forge question. You are passing ReusRenderer::new as a parameter that wants an EntityRendererProvider. Your constructor has 2 parameters but an EntityRendererProvider has only 1 parameter.
  24. Your problem looks to be related to parchment. My guess is you are using the wrong magic incantation? 🙂 https://github.com/ParchmentMC/Librarian/blob/dev/docs/FORGEGRADLE.md (see legacy vs new) But you should ask on their discord if you need help.
  25. Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector redirectGetStarBrightness(Lnet/minecraft/client/multiplayer/ClientLevel;F)F in sodium-extra.mixins.json:stars.MixinWorldRenderer failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap RubidiumExtra-refmap.json Problem with rubidium extra Make sure you have the latest version then contact the mod author.
×
×
  • Create New...

Important Information

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