-
Posts
422 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Novârch
-
-
11 minutes ago, Umpaz said:
I'm trying to create a custom beehive
Take a look at BeehiveBlock and BeehiveTileEntity.
-
1.7.10 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
22 minutes ago, KINØ said:
entity detect when it is right clicked by a player
If it's a vanilla entity, use PlayerInteractEvent.EntityInteract or PlayerInteractEvent.EntityInteractSpecific, if it's your own entity, do what diesieben said.
-
18 hours ago, Slastic said:
globally
Just make either a static list or a HashMap. What's your use case, knowing it will help.
18 hours ago, Slastic said:String name
DO NOT do this, vanilla did this with Ender pearls up to 1.13 and it lead to major exploits, what if a player changes their name?
Instead use the player's UUID (PlayerEntitygetUniqueId).
Edit: Use a HashMap, just used one for my own mod, here's a link to the class where I use it, in my case I'm storing a PlayerEntity as the key and a DimensionType as the value, then I'm using the values to teleport each player to their corresponding dimension.
-
7 hours ago, Umpaz said:
I'm trying to learn more about coding and to get some bases down I downloaded some mods from curseforge. When I try to load them into eclipse and view anything but assets it gives me the error source not found. Is there some kind of decompile I have to do to view the code?
First you'll have to use a deobfuscator like BON2, because mods' source code gets obfuscated when building it, then use a decompiler, like FernFlower to convert the class files from the jar to Java files.
-
10 minutes ago, 65_7a said:
Should I be learning more about Java before I start using Forge?
Yes, you should, modding isn't a good way to learn Java, get used to the language before trying to make something, think about trying to write a book in a language you aren't familiar with.
- 1
-
4 minutes ago, 65_7a said:
I want to make it so when you click on water or a cauldron with a glass bottle, you have a 25% chance of getting an item other than the water bottle. (in my case, a "Salty Water Bottle".) If this is possible, I would like to know how to do this.
Take a look at PlayerInteractEvent.RightClickBlock.
-
Just now, krystianwiechec said:
And what versions are on the forum?
There's a link at THE TOP OF EVERY PAGE explaining it,
-
22 minutes ago, 65_7a said:
I want the output of a crafting recipe to be an enchanted item. Is this possible to do, and if so, how would I do it?
I'd take a look at PlayerEvent.ItemCraftedEvent.
-
1 minute ago, krystianwiechec said:
Minecraft version to 1.12
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
19 minutes ago, krystianwiechec said:
mcp with Minecraft 1.8.8
1.8 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
On 5/20/2020 at 9:23 AM, diesieben07 said:
You should be able to abuse a fact of the capability system here.
Subscribe to AttachCapabilitiesEvent<Entity>. If the entity is one you want to track (presumably it's a living entity) then use AttachCapabilitiesEvent#addLIstener. The listener will be called when the entity is completely removed from the world. You'll also have to check if the entity actually died by some logic (this also fires when the entity despawns), so you might want to check it's health.
This method is probably not perfect, you can do some experimentation.
Maybe this'll help, thought of it immediately after seeing this.
- 1
-
Please provide your debug.log.
-
7 hours ago, TBroski said:
I am just really having issues with this capability system. To get to the point, my capabilities are resetting after unloading and loading the game. I have included images on prints I have set up, but basically I log in the game (variable at 0, because it reset lol) get 5 "points" (seen in image 2). Then I unload the world and log back in (image 3), and the variables are back to 0. Those are my observations. I have seen other posts on forums although they are outdated. I have looked at some other mods source code, however it is hard to find where they use this. But even when/if I find where they serialize the data I am lost between the complexity of all of the methods. All code obtaining to this problem is in the pastebin exept for when I register it in the Main class using;
private void onCommonSetup(FMLCommonSetupEvent e) { CapabilityManager.INSTANCE.register(IPlayerHandler.class, new PlayerCapability.Storage(), PlayerCapability::new); }
I don't know what else you need, but will give/do anything to solve this. If I haven't said before, I am thankful for your time in this troubling time. Thanks
First of all, the way you're making keybinds is horrible, here's an example of how I make keybinds in my mod.
Your problem seems to be that you aren't SYNCING your capability to the CLIENT. Capabilities are stored only on the server by default, check out this example of how I sync capabilities in my mod (you also have to sync on the player logging in, changing dimensiom, leaving the end and respawning). Also, why do you have a public static class in you CapabilityHandler class, it serves no purpose at all, just remove it.
-
1 hour ago, QuantumSoul said:
I pushed to github so you can see the problem:
https://github.com/BinaryQuantumSoul/BinaryMod
Take bitcoins in your inventory
Open a Computer, put a Dark Net and click load
Buy any item
Now drop the just bought item, and take it back, buy another one and mess around,
You'll see what I mean
I fixed it, I've made a pull request on GitHub if you're interested. I did exactly as I said you should (made a static transaction list and resolved it in ServerTickEvent). A comprehensive explanation of what you did wrong can be found in the pull request.
- 1
-
7 minutes ago, QuantumSoul said:
Well there's a list of items, I click on it and it used bitcoins in the inventory to buy it. It add the item to the inventory as well as the remaining money
I would personally keep a static list of transactions and resolve the transactions in an event (likeServerTickEvent).
-
15 minutes ago, flyingturret208 said:
So uh... I passed 256 biomes, I'm fairly certain that I pulled it off by a staggering amount whilst making a modpack for some friends and myself. Is there some way to extend this in 1.12.2?
Please don't necro old threads, make your own. By the way, 1.12 is no longer supported on this forum.
- 1
-
Immersive Portals seems to be the issue, try without it, personally I've found it to be quite buggy. If that doesn't work try without Optifine, other than that post debug.log, it's way more helpful than crash reports. By the way, how are you running over 200 mods with integrated graphics?
-
Can you just tell us what you want to acomplish? Helping you is much easier if we know what you want to do.
-
13 minutes ago, QuantumSoul said:
Well that's the point of this thread
Then why are you sending a packet to the server? Shouldn't you send a packet from the server to the client to sync the inventory?
-
1 hour ago, QuantumSoul said:
NetworkInit.CHANNEL.sendToServer(new BtcBuyPacket(recipe));
Isn't inventory data not synced to the CLIENT?
-
43 minutes ago, BigWordsScareMe said:
Trying to figure out how to make a portal, that may work
Please look at NetherPortalBlock, it has everything you want.
Edit: EndPortalBlock is even more concise, take a look it it too.
-
2 minutes ago, RaulAlonso said:
i have no idea how to check if the item is actually an ore
Check if it's an instance of OreBlock.
3 minutes ago, RaulAlonso said:I want it to be compatible with other modded ore
Not going to happen, from what I've seen a lot of modders don't extend OreBlock for custom ores.
-
You can still do this, did you even try?
[1.15] changing AttributeModifier of item with keypress at runtime
in Modder Support
Posted · Edited by Novârch
Why don't you use Entity#isAirborne? Also, you should use this to get if a keybind is pressed, Minecraft#gameSetiings#"insert keybind here"#isPressed.