Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

unassigned

Members
  • Posts

    103
  • Joined

  • Last visited

  • Days Won

    1

unassigned last won the day on February 2 2019

unassigned had the most liked content!

Converted

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

unassigned's Achievements

Creeper Killer

Creeper Killer (4/8)

13

Reputation

  1. You have everything correct, and when I cloned your project on my side on the same forge version it works. Are you actually getting to a point where onServerStarting should be called? Which seems to be just after the world is finished loading.
  2. By simple GUI you mean you just want to draw a string? You can just invoke the fontrenderer in the Minecraft class (make sure you are on the client): fontRenderer.drawString(String, x, y, color);
  3. You need to read up on sides. You can't directly access minecraft in your mod constructor like that, as the server has no idea what the client Minecraft class is.
  4. I went to look at the isRainingAt() method, and it does some other checks which is why its returning false. However, if you check what biome you are in and if it can rain in the first place, then you can get the expected result: world.getBiome(position).getPrecipitation() == Biome.RainType.RAIN && world.isRaining() This just checks the biome the positions in, and see if it can actually rain. If so, then check if its raining. If both are true, it must be raining at that position. If the biome doesn't allow to rain, and it is raining (as rain happens everywhere), then it'll return false (ex. in a desert).
  5. Yeah, I'll wait for the PR. Thanks for your help!
  6. Maybe? I'll give more of a descriptor: I have each ore in the vanilla game have 3 possible drops when mined by the TE: - a normal drop (the drop that already drops when the player mines it) - a silktouch drop (the drop you get from silk touching the block) - a smelt drop (the item you get from smelting said block) Currently, I have a custom class that stores each of these fields, and a map that stores the block and that storage class. If there is a way to create a loot table to do this, that'd be great, I just haven't messed around with loot tables at all, so I don't completely know the bounds.
  7. Hello, I have a block that only mines a certain block out of a hashmap, and the value of the map is the drops that drop depending on different variables. I want to add the ability to store this HashMap in either a json or config file, as I'd like the player to be able to modify it. I tried doing it through the config, but I see no spec that actually does this. I currently have a class that I'm calling in the setup that sets the values I'd like to store, but obviously this isn't editable by the player. Thanks!
  8. Ah gotcha. I did the following, which is quite hacky but seems to work: I added a parameter to the setVoidStored to send the packet or not, then send the packet when the entity joins the world. new readNBT within the cap: instance.setVoidStored(compound.getInt("VoidStored"), false); new event to send the packet after the player is done connecting: @SubscribeEvent public void onJoinWorld(EntityJoinWorldEvent event) { Entity e = event.getEntity(); if(e != null) { if(e instanceof PlayerEntity) { CapabilityPlayerVoid.getPlayerVoid((PlayerEntity)e).ifPresent(IPlayerVoid::onVoidChanged); } } } Let me know if there is a simpler way of doing it. Other than that thanks for your help!
  9. I believe I went through and changed what needed to be changed, but I still get the same error. I did quite the rewrite to get everything in order again, and just for optimization purposes. Here is the stacktrace again: Here are some direct links to the proper github files, as those will house the lines where everything is happening. CapabilityPlayerVoid PlayerVoid MessagePlayerVoid Thank you both for your help so far.
  10. As Draco said, not many changes in 1.13 vs 1.14. I'd check out McJty's tutorials, he covers a lot of basics and some other useful things such as data generators.
  11. Ok. I think I see what you are meaning, however I still don't exactly see where I'm doing anything wrong. I know when I get the capability to send the packet that the cap isn't ever null, so direct reference is fine in this case I believe.
  12. Yeah, I just needed some clarification on the new LazyOptional system, as I'm still not too sure what/when to use them. So doing something like this: e.getCapability(PlayerVoidProvider.CAPABILITY_PLAYER_VOID).ifPresent(pv -> pv.setVoidStored(message.playerVoid)); isn't correct? Or am I mistaking what you are meaning.
  13. Hello, I've recently started modding again so I'm still fairly new to the 1.13 changes. As capabilities have changed somewhat, I'm getting stuck trying to read/write the cap data when the player first joins: I get a NullPointer when I first login after the capability gets attached. Meaning, the first login works, but any following attempts fail will crash: net.minecraft.crash.ReportedException: Loading entity NBT at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:154) ~[?:?] {re:classloading} at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:882) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:800) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:646) [?:?] {re:classloading,pl:accesstransformer:B} at java.lang.Thread.run(Thread.java:748) [?:1.8.0_231] {} Caused by: java.lang.NullPointerException at net.minecraftforge.fml.network.PacketDistributor.lambda$playerConsumer$1(PacketDistributor.java:216) ~[?:?] {re:classloading} at net.minecraftforge.fml.network.PacketDistributor$PacketTarget.send(PacketDistributor.java:178) ~[?:?] {re:classloading} at net.minecraftforge.fml.network.simple.SimpleChannel.send(SimpleChannel.java:118) ~[?:?] {re:classloading} at com.unassigned.voidmagic.common.capability.playervoid.impl.PlayerVoid.setVoidStored(PlayerVoid.java:61) ~[?:?] {re:classloading} at com.unassigned.voidmagic.common.capability.playervoid.PlayerVoidStorage.readNBT(PlayerVoidStorage.java:37) ~[?:?] {re:classloading} at com.unassigned.voidmagic.common.capability.playervoid.PlayerVoidStorage.readNBT(PlayerVoidStorage.java:10) ~[?:?] {re:classloading} at com.unassigned.voidmagic.common.capability.playervoid.PlayerVoidProvider.deserializeNBT(PlayerVoidProvider.java:39) ~[?:?] {re:classloading,pl:capability_inject_definalize:A} at com.unassigned.voidmagic.common.capability.playervoid.PlayerVoidProvider.deserializeNBT(PlayerVoidProvider.java:15) ~[?:?] {re:classloading,pl:capability_inject_definalize:A} at net.minecraftforge.common.capabilities.CapabilityDispatcher.deserializeNBT(CapabilityDispatcher.java:139) ~[?:?] {re:classloading} at net.minecraftforge.common.capabilities.CapabilityProvider.deserializeCaps(CapabilityProvider.java:96) ~[?:?] {re:classloading} at net.minecraft.entity.Entity.read(Entity.java:1656) ~[?:?] {re:classloading,pl:accesstransformer:B} at net.minecraft.server.management.PlayerList.readPlayerDataFromFile(PlayerList.java:269) ~[?:?] {re:classloading} at net.minecraft.server.management.PlayerList.initializeConnectionToPlayer(PlayerList.java:112) ~[?:?] {re:classloading} at net.minecraft.network.login.ServerLoginNetHandler.tryAcceptPlayer(ServerLoginNetHandler.java:119) ~[?:?] {re:classloading} at net.minecraft.network.login.ServerLoginNetHandler.tick(ServerLoginNetHandler.java:63) ~[?:?] {re:classloading} at net.minecraft.network.NetworkManager.tick(NetworkManager.java:241) ~[?:?] {re:classloading} at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:148) ~[?:?] {re:classloading} ... 5 more I should also add that it does not crash when I send the packet through other means. I do have some idea to what is causing this crash, however: the packet to update the server w/ the client is being sent while the client is not actually connected yet. I found this result through checking if the client is connected before syncing the data, however this leads to the values not being synced once the NBT is set. I just have no idea on how to fix this problem. Here is the code that is within the stacktrace, and here is my github if you need to see anything else. PlayerVoidStorage (Capability Storage Class): PlayerVoidProvider (Capability Provider Class): PlayerVoid (impl of IPlayerVoid):
  14. Hello, recently I've decided to pick modding back up again, however during my setup of my modding environment I've run into an issue with launching the game after the build and running genIntellijRuns. Everything works fine, the examplemod is there and all syntax seems to be in place. I have changed nothing, yet I get this error when trying to launch: [14:31:43] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20190829.143755, --fml.mcVersion, 1.14.4, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 28.1.65, --version, MOD_DEV, --assetIndex, 1.14, --assetsDir, C:\Users\Blake\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ❄❄❄❄❄❄❄❄, --userProperties, {}] [14:31:43] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 4.1.0+62+5bfa59b starting: java version 1.8.0_231 by Oracle Corporation [14:31:43] [main/DEBUG] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Found launch services [minecraft,fmldevdata,fmldevclient,fmldevserver,fmluserdevserver,testharness,fmluserdevdata,fmlclient,fmluserdevclient,fmlserver] [14:31:43] [main/DEBUG] [cp.mo.mo.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp] [14:31:43] [main/DEBUG] [cp.mo.mo.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [eventbus,object_holder_definalize,runtime_enum_extender,accesstransformer,capability_inject_definalize,runtimedistcleaner] [14:31:43] [main/DEBUG] [cp.mo.mo.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services Exception in thread "main" java.lang.NullPointerException at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Iterator.forEachRemaining(Iterator.java:116) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at cpw.mods.modlauncher.TransformationServicesHandler.discoverServices(TransformationServicesHandler.java:137) at cpw.mods.modlauncher.Launcher.run(Launcher.java:74) at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) So far, in an effort to resolve the issue I have: - reinstalled and re-setup all java environments, including JRE and JDK. - reinstalled gradle and my IDE. - used less recent builds of forge
  15. Hello, I have a config class that I setup based on the official documentation, however, I need a map assigned to this value that can only be accessed after the initialization phase, as it accesses the OreDictionary and I'd like to write all the data that this outputs to the config. I'd like to make it so if the map is empty/null write the default oredict data. Thanks.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.