-
Content Count
181 -
Joined
-
Last visited
Community Reputation
1 NeutralAbout Elrol_Arrowsend
-
Rank
Creeper Killer
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
i am aware that 1.12.2 is no longer supported, and I know that people are going to say 'update'. This is for a project for a mod that is 1.12 and hasnt updated as of yet, when they do, I will update. I am trying to use a few forge methods and I am getting very odd happenings. For example. I am trying to get the registry name of items and put them to a string. The issue is that when I use "Items.WOODEN_SHOVEL.getRegistryName()" it is returning something called "nf" and not the ResourceLocation like it should be. I have a similar issue with using the player from a break block event. Instead of the player it was returning something called "aed" Firstly, in my ide, these classes dont exist and trying to set them to it results in issues. The only methods they have are things like "arg" or "cast" and im not sure what is going on. This is the first time seeing it and it only happend recently.
-
[1.14.4] Getting an item from a tag
Elrol_Arrowsend replied to Elrol_Arrowsend's topic in Modder Support
Well, I was already told to not do this, but what I was doing, was checking if there is any items registered to a certain tag, and if so try and get the first one so I can use it in my code to enable/disable item and recipe registration, but I am now just registering the item and I need to disable the recipes if the item doesnt exist, which is my next goal. I am not too sure how to use the conditions in the recipes to check for a mod or item -
I am attempting to get an Item from a tag (like 'Ingots/copper') to have my mod offer support for mods, but I am having an issue with my method returning null, so I assume that I have something wrong, or I am going about it the wrong way. public static Item getOreDict(String oreDic) { ResourceLocation tag = new ResourceLocation("forge", oreDic); Tag<Item> t = ItemTags.getCollection().get(tag); if(t == null) { Main.LOGGER.error(tag.toString()); return null; } Collection<Item> tagCollection = t.getAllElements(); for(Item item : tagCollection) { Main.LOGGER.info(item.getName().getFormattedText()); return item; } return null; }
-
Elrol_Arrowsend started following [1.14.4] [Solved] Lang file is not working., [1.14.4] Change command permissions, [1.14.4] Crashing on player teleport. and and 2 others
-
Basically what I am wanting to do is to change how minecraft/other mods check for permissions. The reason I want to do this is to be able to control which commands players can use without changing them to an operator. For my own mod, this is easy, but I am not sure how to do so with others, If you have any suggestions or questions please let me know.
-
[1.14.4] Crashing on player teleport.
Elrol_Arrowsend replied to Elrol_Arrowsend's topic in Modder Support
Not at all, never a good thing to edit vanilla, these are all running from the execution of my commands. -
[1.14.4] Crashing on player teleport.
Elrol_Arrowsend replied to Elrol_Arrowsend's topic in Modder Support
Thats why I was worried, im using forge, and that only happens when i called my teleport method from inside a runnable that i had set on a delay. But it seems to be working now, I just wish i knew why. On top of that it normally just times the client out and kills the server because a single tick took over a min. so idk -
[1.14.4] Crashing on player teleport.
Elrol_Arrowsend replied to Elrol_Arrowsend's topic in Modder Support
Going to be honest, I am not sure what the difference is. The code was being called in a runnable, and I managed to work around this and have the location and uuid stored and then just having another method check the stored location and teleport the player there. -
I am getting an error when trying to teport players to different dimensions java.lang.ArrayIndexOutOfBoundsException: 110 at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.rehash(LongLinkedOpenHashSet.java:1083) ~[fastutil-8.2.1.jar:?] {} at net.minecraft.world.lighting.LevelBasedGraph$1.rehash(LevelBasedGraph.java:26) ~[forge-1.14.4-28.1.62_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading} at it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet.add(LongLinkedOpenHashSet.java:368) ~[fastutil-8.2.1.jar:?] {} at net.minecraft.world.lighting.LevelBasedGraph.addToUpdate(LevelBasedGraph.java:96) ~[?:?] {re:classloading} at net.minecraft.world.lighting.LevelBasedGraph.propagateLevel(LevelBasedGraph.java:138) ~[?:?] {re:classloading} at net.minecraft.world.lighting.LevelBasedGraph.propagateLevel(LevelBasedGraph.java:150) ~[?:?] {re:classloading} at net.minecraft.world.chunk.ChunkDistanceGraph.notifyNeighbors(ChunkDistanceGraph.java:24) ~[?:?] {re:classloading} at net.minecraft.world.lighting.LevelBasedGraph.processUpdates(LevelBasedGraph.java:189) ~[?:?] {re:classloading} at net.minecraft.world.server.TicketManager$ChunkTicketTracker.func_215493_a(TicketManager.java:298) ~[?:?] {re:classloading} at net.minecraft.world.server.TicketManager.func_219353_a(TicketManager.java:98) ~[?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.func_217235_l(ServerChunkProvider.java:268) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.world.server.ServerChunkProvider.access$200(ServerChunkProvider.java:48) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.world.server.ServerChunkProvider$ChunkExecutor.driveOne(ServerChunkProvider.java:504) ~[?:?] {re:classloading} at net.minecraft.world.server.ServerChunkProvider.func_217234_d(ServerChunkProvider.java:264) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:731) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:720) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.concurrent.ThreadTaskExecutor.driveUntil(ThreadTaskExecutor.java:123) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:706) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:650) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201] {} The methods that I am using to try to teleport the player: public static void teleport(ServerPlayerEntity player, Location loc) { PlayerData data = Main.database.get(player.getUniqueID()); if(player.world.isRemote) Logger.err("WORLD IS REMOTE"); data.prevLoc = getPlayerLocation(player); ServerWorld world = player.server.getWorld(loc.getDim()); if(Main.isDev()) { world = player.server.getWorld(loc.getDim()); if(world.isAreaLoaded(loc.getBlockPos(), 5)) { Logger.log("AREA IS LOADED"); } else { Logger.log("AREA IS BEING LOADED"); } } else { TextUtils.err(player.getCommandSource(), "The ability to teleport between dimensions has been disabled until it can be fixed."); return; } player.teleport(world, loc.x() + 0.5D, loc.y(), loc.z() + 0.5D, loc.getYaw(), loc.getPitch()); }
-
So, it was brought to my attention that the way that I am teleporting the player using commands seems to cause some rather bad happenings on the server. When I first tried it, after they found the issue, I tried to teleport from the overworld to the end. When I did it had me suspended in what looked like the end, but nothing was loaded, no blocks could be seen, I couldn't move, nothing. Eventually my client disconnected, and then when I tried to log back in the server crashed saying that the server took a 60 seconds for a single tick. The way that I am attempting to teleport the player is just like how they do it in minecrafts code (pulled from the end portal block code) entityIn.changeDimension(worldIn.dimension.getType() == DimensionType.THE_END ? DimensionType.OVERWORLD : DimensionType.THE_END); What I am doing is this: public static void teleport(ServerPlayerEntity player, Location loc) { PlayerData data = Main.database.get(player.getUniqueID()); data.prevLoc = getPlayerLocation(player); BlockPos pos = loc.getBlockPos(); if(!player.dimension.equals(loc.getDim())) { if(Main.isDev()) { player.changeDimension(loc.getDim()); }else { TextUtils.err(player.getCommandSource(), "The ability to teleport between dimensions has been disabled until it can be fixed."); return; } } player.setPositionAndUpdate((double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D); } I feel like something I am doing must be the issue, it is normally the reason, but I was fairly certain that this would work.
- 1 reply
-
- 1
-
-
[1.14.4] Prevent the server from sending config
Elrol_Arrowsend replied to Elrol_Arrowsend's topic in Modder Support
I have not tested that quite yet, I will do so in a bit and see what happens. -
[1.14.4] Prevent the server from sending config
Elrol_Arrowsend replied to Elrol_Arrowsend's topic in Modder Support
Wouldn't it be relating to the client not having a mod that the server does? When I was looking around this error had been around for some time. I was thinking that it was refering to the default config for my mod having integers in the config with a min of 0. But if there is no way to fix it, and it doesn't seem to cause any issues other then on the log, should i worry about it at all? -
I am currently getting an issue for my mod, not a large issue, just some errors thrown into the log. From what I can tell, it is because the mod is not present on the client and it is trying to send/sync the config up with the client. And since the client doesnt have the config null is less then 0. My goal is to make a server side mod, that can be used on the client, but not required. The error is short so I will just put one of the segments here [14:01:31] [Client thread/FATAL]: Error executing task on Client java.lang.IllegalArgumentException: Default value cannot be lower than minimum value! at aju.<init>(SourceFile:21) ~[1.14.4.jar:?] at dkc.a(SourceFile:2054) ~[1.14.4.jar:?] at no.a(SourceFile:70) ~[1.14.4.jar:?] at no.a(SourceFile:15) ~[1.14.4.jar:?] at ke.a(SourceFile:21) ~[1.14.4.jar:?] at ke$$Lambda$1872/204485816.run(Unknown Source) ~[?:?] at agq.h(SourceFile:144) [1.14.4.jar:?] at agu.h(SourceFile:23) [1.14.4.jar:?] at agq.q(SourceFile:118) [1.14.4.jar:?] at agq.bh(SourceFile:103) [1.14.4.jar:?] at cyc.e(SourceFile:915) [1.14.4.jar:?] at cyc.b(SourceFile:410) [1.14.4.jar:?] at net.minecraft.client.main.Main.main(SourceFile:155) [1.14.4.jar:?]
-
I am not sure what the issue could be, I know the file works, because I use that in a resource pack and its fine, the file is named properly, but still when I use the mod it doesnt work. What could be the issue? -Edit- Just found out that somehow it was missing a bracket. Not sure how i missed that.
-
[1.12.2] Adding Properties to Blocks that dont have them
Elrol_Arrowsend replied to Elrol_Arrowsend's topic in Modder Support
Alright, many thanks. I will see if that will work for what I am trying to do. -
I am fairly certain that unless a blockState has the property already added at initialization you cant add a property to it, but a friend told me they had seen someone do it. Just to clearify, I would make a Property and add it to, lets say for example, an air block. Normally it would throw an error saying that you cant add it to the block state, because the BlockStateContainer doesnt have that property. So my question would be is there a way around this, and if not, what would the best way of storing two things on to virtually any block in minecraft?