Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. I've now tried the mod in my ide but I don't get any errors these are the logs from server and client client.logserver.log
  2. use Block#getDrop to get the drops of the block. Then create a for each loop to put the items in the player's inventory with ItemHandlerHelper#giveItemToPlayer Note: that would be the explanation for 1.16 I'm sure that it works in 1.15 too, but it could be that some methods are not available or that they have a different name
  3. interesting that you get an error, I suspect it is because you are using the server run from the ide I use a "normal" forge server (because the server run in the ide does not work for me) and I don't get any error messages Edit: what do i have to change or which class is missing
  4. sorry for that but my ide creates this folder automatically i try to change this What? how it does not manage the server start? what do i have to change?
  5. okay, first of do you know java basics? if you know the basics then it shouldn't be a problem for you to expand the AbstractArrowEntity class, creat a arrow item. only briefly about the function of the bow, if you use it, an entity (Arrow) is created from the ArrowItem found in the inventory, your ArrowItem requires such a method see the ArrowItem class to recreate the method for your Arrowtem
  6. look how vanilla does this
  7. I created a mod for the 1.16.5 when I put it in the mods folder of my test server. I get the error message in the server list: "Incompatible fml modded server. Server network message list is not compatible" server and client have the same mods this is my mod
  8. your arrow entity class only needs to extends the AbstractArrowEntity class
  9. use Minecraft#getInstance ()#player I don't know if that works because the event may be called before that there is a ClientPlayerEntity
  10. okay that's obviously where the error is (itmes?)
  11. the model and your registration looks okay i think that you have your texture in a wrong directory (because your ide shows you the error) can you create a screenshot of your textures folder in your ide because I suspect that the error is there somewhere or create a github repo (that would be the best option)
  12. okay if you want to remove the emerald trades from the list there is the possibility that i have already explained to you to overwrite the villager and the trade function. There is another possibility but I haven't tested it myself and I don't know if it works and if is compatible with other mods you can apply the following explanation to all trades of the villager with a for-each loop (Edit: you cannot use a for-each loop if you remove it in the loop) with ITrade#getOffer you get the MerchantOffer in which you can get the 1 and 2 buying item, then you can remove the trade
  13. the file does not exist / in the wrong folder because your ide shows you the error post your model class because only with the error it will be difficult to help you
  14. You're right, minecraft only needs the name of the file and not the complete path
  15. okay i guess you didn't understand correctly how villager choose their tardes. Each villager has an ITrade list for each level, from which the villager randomly selects two trades. if you want the villager to always have the same trades you have to remove the existing ones from the list and then you can add a maximum of two trades to this list. if you want the villager to have more than two trades per level you have to overwrite the vanilla villager and change the trade system so that it shows more or all trades from the list
  16. I created a tag as described in the forge doc, when I try to check whether a block is included in this tag, I get an error this is my tag this is my Tag Class and that's the block class in which I use the tag and that's the error i get: [16:05:47] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:130]: ---- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 09.03.21, 16:05 Description: Unexpected error java.lang.NullPointerException: Cannot invoke "net.minecraft.tags.ITag.contains(Object)" because the return value of "net.minecraft.tags.ITagCollection.get(net.minecraft.util.ResourceLocation)" is null at net.luis.industry.api.blocks.PipeBlock.updatePostPlacement(PipeBlock.java:79) ~[main/:?] {re:classloading} at net.minecraft.block.AbstractBlock$AbstractBlockState.updatePostPlacement(AbstractBlock.java:749) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraft.block.AbstractBlock$AbstractBlockState.updateNeighbours(AbstractBlock.java:684) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraft.world.World.markAndNotifyBlock(World.java:274) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.World.setBlockState(World.java:241) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.World.setBlockState(World.java:205) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B} at net.minecraftforge.common.extensions.IForgeBlock.removedByPlayer(IForgeBlock.java:200) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.common.extensions.IForgeBlockState.removedByPlayer(IForgeBlockState.java:157) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraft.client.multiplayer.PlayerController.onPlayerDestroyBlock(PlayerController.java:118) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.multiplayer.PlayerController.clickBlock(PlayerController.java:143) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1349) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1688) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runTick(Minecraft.java:1507) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:979) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.luis.industry.api.blocks.PipeBlock.updatePostPlacement(PipeBlock.java:79) ~[?:?] {re:classloading} at net.minecraft.block.AbstractBlock$AbstractBlockState.updatePostPlacement(AbstractBlock.java:749) ~[forge:?] {re:classloading} at net.minecraft.block.AbstractBlock$AbstractBlockState.updateNeighbours(AbstractBlock.java:684) ~[forge:?] {re:classloading} at net.minecraft.world.World.markAndNotifyBlock(World.java:274) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.World.setBlockState(World.java:241) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.world.World.setBlockState(World.java:205) ~[forge:?] {re:classloading,pl:accesstransformer:B} at net.minecraftforge.common.extensions.IForgeBlock.removedByPlayer(IForgeBlock.java:200) ~[forge:?] {re:classloading} at net.minecraftforge.common.extensions.IForgeBlockState.removedByPlayer(IForgeBlockState.java:157) ~[forge:?] {re:classloading} at net.minecraft.client.multiplayer.PlayerController.onPlayerDestroyBlock(PlayerController.java:118) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.multiplayer.PlayerController.clickBlock(PlayerController.java:143) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1349) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:1688) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} -- Affected level -- Details: All players: 1 total; [ClientPlayerEntity['Dev'/233, l='ClientLevel', x=-60.09, y=67.00, z=3.87]] Chunk stats: Client Chunk Cache: 841, 529 Level dimension: minecraft:overworld Level spawn location: World: (-48,68,18), Chunk: (at 0,4,2 in -3,1; contains blocks -48,0,16 to -33,255,31), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 4504 game time, 4504 day time Server brand: forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.world.ClientWorld.fillCrashReport(ClientWorld.java:465) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2091) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:633) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {} at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) ~[?:?] {} at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {} at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.5-36.0.46_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {}
  17. If I understand correctly you want to replace the vanilla trades, if this is the case, create a new list for each trade level and return it here is an example i didn't replace the trades but create new ones for my own professions. but is the same way you have to use: https://github.com/Luis-st/Forge-1.16.5-36.0.1-mdk/blob/main/forge-1.16.5-36.0.1-mdk/src/main/java/net/luis/cave/events/villager/OnMinerTradesEvent.java
  18. 1.12.2 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  19. okay i have applied your notice on my packet system now the other 2 messages also work is there another possibility to add a delay/cooldown, because despite the TickEvent#phase check you can still change the tools too quickly
  20. okay I have now created 3 more messages (NextTool, ToolDown, ToolTop) these are currently only sent by pressing keys, and later also by scrolling with the mouse unfortunately only the first message works, which always gives the player the next tool. at the others, the player's hand moves but he doesn't get a new item this is my ClientTickEvent why do only the first message? and how do I prevent the permanent switch of tools when pressing (adding a cooldown)?
  21. If, as explained above, I want to swap the item in the player's hand for the item from a slot in the backpack (when the player presses a key or sneak and uses the mouse wheel) I also need a message again, am I correct?
  22. okay i already thought so, but why is the interface unnecessary? to the tools switch slots. I probably also need a message for this, right?
  23. it's getting stranger and stranger...
  24. that seems very strange to me post the link of that what already exists on github
  25. the first thing about your mistake is that there are usually two constructors, one for the server and one for the client. but you only have one constructor I think he's using MCreator
×
×
  • Create New...

Important Information

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