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


Forge Modder
  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About AnZaNaMa

  • Rank
    Creeper Killer


  • Gender
  • URL
  • Location
    Inside the ViewMatrix
  • Personal Text
    I only like Java, because I love Coffee

Recent Profile Visitors

2326 profile views
  1. Not sure if this is the right thread, so move it if I'm in the wrong place. I'm working on updating an old mod to 1.15.2, which runs a RESTful HTTP server alongside the game server that allows outside services to query information. Originally, I had implemented this using Netty, because it is already included in any Minecraft game. However, I was unable to figure out how to get an HTTPS server running, and honestly Netty is too low-level for this project. It required like 10 different classes just to get a basic HTTP server running. I've been looking into di
  2. Oh wow I'm stupid. Yeah, originally I was just using the normal block class. Guess I forgot to change it after I made my custom block class. I've changed it to TradeTerminalBlock and that's solved my problems. However, I still have a couple of questions. First off, it seems like the game is somehow saving my blockstate's properties when I quit the world, but I haven't written anything to translate the blockstate into nbt or metadata or anything. How is this information saved, since getStateFromMeta and getMetaFromState no longer exist? If I were to create my own custom BlockState p
  3. I checked out the Loom, because it uses HorizontalBlock Loom BlockState: { "variants": { "facing=north": { "model": "block/loom" }, "facing=south": { "model": "block/loom", "y": 180 }, "facing=west": { "model": "block/loom", "y": 270 }, "facing=east": { "model": "block/loom", "y": 90 } } } Loom Model: { "parent": "block/orientable", "textures": { "top": "block/loom_top", "bottom": "block/loom_bottom", "front": "block/loom_front", "side": "block/loom_side" } } As you can
  4. Hello, I'm having some troubles getting simple BlockStates to work in 1.15.2 (forge 31.1.1). Currently, I'm trying to get a simple rotatable block. Originally, I tried using the official Forge ReadTheDocs, but I've noticed that the Forge documentation is SEVERAL MAJOR VERSIONS out of date. The readthedocs says that the documentation is for 1.15.x, but most of the information in there is clearly out of date. All of the references it makes use the old naming scheme, and it often tells you to use methods that no longer exist. I was following the instructions on the docs, but that tuto
  5. Hello! I've noticed that newer versions of Forge like to dump out the entire registry when the game loads, which makes it annoying to try and read through the console while testing mods in my development environment. Is there a way to disable this registry dump, while still keeping the log level at DEBUG?
  6. I managed to figure it out. I had my @EventBusSubscriber wrong (had to subscribe to the client-specific bus for the FMLCommonSetupEvent). Because of that, the event handler wasn't firing, so the instance of the capability was never being injected with a value, so it was still null when I tried to use it. @Draco18s also, you were right. I was just passing an instance of my ILifeForce, when I needed to pass it a supplier. I ended up using a lambda supplier: @SubscribeEvent public static void onCommonSetupEvent(FMLCommonSetupEvent event) { CapabilityManager.INSTANCE.register(I
  7. LIFE_FORCE_CAP is a Capability<ILifeForce>, so the call to LIFE_FORCE_CAP::getDefaultInstance will resolve to Capability::getDefaultInstance which does exist. I was under the impression that getDefultInstance would return the instance of LifeForce that I passed into CapabilityManager.INSTANCE.register()
  8. FIrst off, the file contents you gave for your model file for example_item.json look like a localization file. For regular rendering of an item, your src\main\resources\assets\fm\models\item\example_item.json would look something like this: { "parent": "item/generated", "textures": { "layer0": "modid:item/example_item" } } That "modid:item/example_item" is a resource location for the texture that will be used to draw layer0, which is the only layer in this case. Essentially, the "modid:item/example_item" refers to the texture for your item. With the way that reso
  9. Hello, I'm working on implementing a capability for living entities for a mod I'm working on and I've run into some trouble. I believe I've gotten most of it right, from what I've gathered from other threads here. The trouble I'm running into is when the AttachCapabilitiesEvent<Entity> I'm hooking into fires. When that event fires, I'm calling event.addCapability(), and the game crashes while it's attempting to create the new instance of my capability provider (ICapabilitySerializable), throwing a null pointer exception. Here, you can see my event listener for the
  10. Hello, I'm working on a mod that communicates information about the minecraft server to outside sources. One of the ways I'm trying to accomplish this is by hooking into certain events and sending out an HTTP post request with a json payload to a user-defined endpoint. I'm using Netty to accomplish this, since it's already used by minecraft. For some reason, though, my HttpClient won't send the messages through. I have print statements before and after message sending and it gets to the first message, but never gets to the second one. I realize this is more of a question about Netty than forge
  11. I discovered that either minecraft or forge is already keeping a record of tick times, so I'll just use this instead to avoid having a tick handler that bogs down the server. For anyone in the future, who's interested in this, look in net.minecraftforge.server.command.CommandTps to see how the forge TPS command calculates it.
  12. Hello, I'm attempting to monitor the average tick time of a forge server in my mod. Currently, I'm using an event handler that subscibes to TickEvent.ServerTickEvent to record System.currentTimeMillis each tick and then when someone asks for the TPS, I average out the differences between times in the array to find the mean tick time in milliseconds and divide 1000 by that to get the TPS. However, the numbers I come up with are always much larger than those produced by the 'forge tps' command (i.e. 0.3ms vs 10ms). I'm fairly certain my math is correct, which means there must be a pr
  13. I have a command that teleports a player to another player and in that, I make a check to see if the player is in the same dimension as the other one, and if not, I call EntityPlayer::changeDimension(); This seems to teleport the player fine, but it causes a weird desync with the client. The mod is server side only, as it's only a commands mod and I don't want to make my players have to download anything additional. The client acts like it doesn't know it moved to a new dimension. It sees everything in the new dimension fine, but other players can't see the one who teleported and the clie
  14. Thank you. Sorry, I haven't worked with entities so I didn't have any experience with methods involving them or I would have just looked there.
  • Create New...

Important Information

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