
Everything posted by Cadiboo
-
How do i add new properties to existing blocks with a mod?
You could use events or registry replace the block. Events will be more compatible.
-
How do I Intercept the Item use event for flint and steel
https://mcforge.readthedocs.io/en/1.15.x/events/intro/
-
How do i add custom tulips to biomes, where the vanilla-tulips are in?
You could hand write a list of biomes the tulips are normally on, or loop every biome and check if it has tulips in it.
-
[1.14+] Creating moveable & resizeable HUD elements
OpenGL is a rendering engine. If you want to have buttons like Minecraft's ones you should be using Minecraft's system. In your Screen, you’re going to want to have a Widget. This widget should be one of the children of your Screen. The widget can then set its position to the position of the mouse after it’s clicked and then stop setting its position when it’s clicked again.
-
[SOLVED] [1.15.2] Custom arrow entity not rendering
It’s a community project, anyone can contribute. Unfortunately they seem to be pretty slow in accepting PRs, same as in the main Forge repo.
-
[Solved]1.15 Hook into world generation
Update your mappings
-
[1.14+] Creating moveable & resizeable HUD elements
Forge's Slider has a drag & drop-ish feature, maybe look at that? You can also set Widget's positions with the forge-added setters.
-
[1.14.4] How to add dimension checks to my mob spawning conditions?
How does vanilla do it for Zombie Pigmen?
-
Translucent color overlay for blocks and items
Yes. It also allows for multiple render types though.
-
[SOLVED] [1.15.2] Custom arrow entity not rendering
Ah. Remove that hack and override getSpawnPacket or whatever it’s called in your entity and return NetworkHooks.getSpawnPacket(this) (I think)
-
Spawn entity in player position
The very first library...
-
help with ai for qustom squid
AIs used to work off a task list and that task list used to be public. If they still work off a task list, you can just edit that list. Anyway, you’re not modifying the original squids AI, you’re modifying your squids AI. Correct me if I’m wrong but you can just instantiate your own subclass of FleeGoal and add it to your task list (after removing the original flee goal if necessary)
-
[1.14.4] Create two-block tall block
You would start by looking at vanilla’s implementation in referenced/external libraries, then seeing all the things that are wrong with it, then seeing what you can improve, then making your own implementation.
-
[SOLVED] [1.15.2] Custom arrow entity not rendering
I was in a hurry when I wrote that and I noticed your setting/getting item refs and thought it could be an issue. I’m not sure what the issue is, can you please post your code on GitHub?
-
[SOLVED] [1.15.2] Custom arrow entity not rendering
You can add a priority to your @SubscribeEvent annotation to ensure you run before/after other listeners. One thing you may have forgotten is that Items are Singletons. I.E. there is only one (the one you register) in the game. Other than that I don’t see any glaring issues, you’ve debugged and noticed that neither your renderer or the vanilla arrow renderer is being called for your entity?
-
[1.14.4.] Custom Skeleton not holding bow
Here’s a list of pre requisites for modding that include some good java tutorials.
-
Bypassing JSON for texture registering
Everything you want to do is possible, but I’m general it causes bad things to happen and is highly discouraged. If you want to do what you’ve mentioned right and compatibly it will require quite a bit of work to do right as you will need to deal with situations where objects haven’t been registered when a client connects to a sever. How are you planning on handling this? You’re also going to need to handle all assets (models, textures) and data (recipes) in a compatible way that allows them to be overriden by resource and data packs. If you’re trying to register objects only if another mod is present, there are other, more compatible ways of adding mod-specific content. You’ve been meant to use the registry events since 1.7.10. If everybody used the registry events correctly, dynamic registration would be possible, but people don’t and therefore supporting universal dynamic registration becomes impossible. If you were a bit more clear about what you were doing and why you might find that people were more helpful. For example instead of saying “I want to do something that is discouraged because of how difficult it is to do right and incompatible with badly made mods it is” you could lay out why you want to do this, what you plan on doing in your mod and how you’re planning on handling edge cases (such as unregistered objects on connection) to ensure that everything continues to work properly.
-
[SOLVED] [1.15.2] Recipe JSON isn't loading
It was both Mojang and Forge that made these changes but I quite agree about hot it’s cleaner.
-
Spawn entity in player position
-
help with ai for qustom squid
Ouch, yeah. For anyone else who thinks of downloading it, here it is i tried copypasting the squid ai to my custom squid, but it gave a lot of bugs. here is my entitylist class: <ItemList class copied from HarryTalks or similar, static initialisers for EntityTypes> my MutantSquid class: <Copy past of minecraft entity squid class (maybe with a couple tweaks?)> and the vanilla squid class, for convenience: <Copy past of minecraft entity squid class> if you were to help me, thank you. i can't figure this one out by myself. Thanks, but you've set it up a couple folders too low. Here's what a properly set up GitHub repository should look like. While we're at it, here's what a proper registration class looks like and here's what a simple entity looks like. As you can see, the better way of doing entities is extending a vanilla class and then overriding behaviour. I would do this by extending the squid and adding an AI task that swims towards a "target". I would also override the update method and periodically recalculate that target. I have no experience with AIs, so I'm not sure if that's the tight approach, but that's what I would start off with. If you keep checking my example mod, I'm planning on adding an AI that charges at players to my Wild Boar as soon as I get some spare time.
-
[SOLVED] [1.15.2] Recipe JSON isn't loading
That’s the way it was in 1.12.2, it changed in 1.13
-
[1.15.1] Weird small type arms rendering when elytra flying?
Sorry I can’t help more, but have you tried stepping through what’s happening in the debugger and seeing why the arms are being rendered?
-
help with ai for qustom squid
Please use a service like GitHub, GitHub Gist or Pastebin for sharing code. Also don’t share Mojang’s intellectual property (their copyrighted code) online. Other than that, great question and I’ll come back to answer it once I’m on a device that can open that file.
-
Items look weird and crooked in inventory
You could also emphasise the progression by having unique textures that look good or your own custom models.
-
Spawn entity in player position
Use World#addEntity. Make sure to use EntityType#create, not the class constructor. You can then use Entity#setPosition (or similar). In future please try looking at the vanilla code first, it’s very helpful (you are modding their game) and you could have answered this question yourself by looking at any vanilla code that spawns an entity.
IPS spam blocked by CleanTalk.