Everything posted by Draco18s
-
[1.15.2] get World variable from save
Why?
-
[1.14.4] Do I get a Capability like this?
Depends on what you want to do with it. But no, this probably won't do what you really want. If the player doesn't have the capability, you're going to get a blank one, make some changes to it, then toss it in the garbage. It is better to use ifPresent, which takes in a lambda operator. But in general: Capability cap = player.GetCapability(...).orElse(null); if(cap != null) { //do stuff } is the same as player.GetCapability(...).ifPresent(cap -> { //do stuff });
-
[1.14.4] How can I make my leaves check for logs diagonally?
Comparing blocks is as easy as world.getBlockState().getBlock() == aBlock. You have an array, use a loop or other array lookup convenience method. Checking diagonals means you want to check a volume not a direction so you should use BlockPos.getAllInBox().
-
Make a block drop XP
Why not check how vanilla does it?
-
[1.15.2] Custom WorldType with multiple biomes?
You're mostly on your own. There aren't tutorials for this sort of thing as worldgen is very complex.
-
[1.15.2] Implementing multiblock structures with support for vanilla blocks
On block placed: Check to see if structure is complete. It is? Do thing.
-
[1.15.2] Custom WorldType with multiple biomes?
You can make any biome provider you want to. SingleBiomeProvider is easy because it (a) already exists and (b) requires virtually no configuration. Replacing it with something else is as simple as "use a different provider" (but you're going to need to specify more details).
-
[Fabric / 1.15.2] Help with allowing Illegal Characters in Text Boxes
Because people who come here know how to program with Fabric. Yes. That makes sense.
-
[1.15.2] Getting a block position as soon as block is placed, and storing in NBT for later use
1) Because you don't save that variable either and 2) You could do without it entirely by storing garbage data in the BlockPos by default (say, a y value of -1) and if the data is garbage after read has been called, do the thing you currently do in first tick.
-
Vertical Biome Generation
Ah, thanks. I'd done a google search (as the mojang website is a nightmare to try and search for information on) and hadn't even seen an announcement. Anyway. There's some detail.
-
[1.15.2] How to send mining and walking function to player?
Single player uses an integrated server. Its how "open to LAN" even functions at all.
-
[1.15.2] Getting a block position as soon as block is placed, and storing in NBT for later use
You see this method? https://github.com/MistaOmega/Opes/blob/master/src/main/java/mistaomega/opes/tiles/TerraEngineTile.java#L198 Do you see any code related to the mining position there? No? Why not?
-
Leaf block showing transparent sections as black
Teach a man how to fish, etc etc.
-
Leaf block showing transparent sections as black
Vanilla has leaves, right? Go find them. Use the search. "transparent block" should get you five or six results You're following someone else's shitty YouTube tutorial. You're doing things because they did things without stopping to think "why did they create that class?" and whether or not that class served a valid purpose. Using inheritance to avoid code reuse is not a valid purpose. We've had this issue listed in the common problems post for about a year.
-
Leaf block showing transparent sections as black
Any reason you aren't extending LeavesBlock? Any reason you aren't telling the game your block is transparent? Any reason you are using BlockItemBase? (A base block item already exists, its called BlockItem).
-
How would i make waypoints?
I'm not sure the client player is aware of its bed location, I think that's server-side information. As for where to store this information, you need to answer a few questions: Is this mod client side only? Does this information need to be saved to disk and reloaded the next time the player joins a world?
-
How would i make waypoints?
And this is why my first reply was an attempt to get you to think about your problem.
-
How would i make waypoints?
For example: Me: "What is a waypoint?" You - it is a location in space represented by 3 values. Me: "So, a BlockPos"
-
How would i make waypoints?
Think about "what are waypoints?" and "what object are they relevant to, so I can store them there?"
-
[1.14.4] How can I make my leaves check for logs diagonally?
Which part are you having problems with? Do you need help comparing blocks? (your TODO) Do you need help checking diagonals? (the thread title) Something else?
-
Forge Client Not Starting
The problem isn't "you have sounds and your sounds.json file is bad" but that "Mac OS has injected files into a location and the game thinks its a sounds.json file"
-
[SOLVED] # Minecraft crashes #
The strings "hm" and "hm: (the " being part of the string) are probably unique enough.
-
Vertical Biome Generation
This is not a thing. Dinnerbone mentioned that it would be "a cool thing to have" six years ago. That's the most recent comment on it from anyone at Mojang.
-
Custom Pillar Block Not Working
He already did: And it does contain the error. I spotted it easily.
- Custom Pillar Block Not Working
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.