Everything posted by Draco18s
-
[1.12] Butcher Harvesting Meat Doesn't do Anything
if (this.villagerObj.getDistanceSqToEntity(this.animal) > 2.25D) //Crashes here No, it's crashing trying to calculate the distance. Inside this function. There's only one object here that could be null: this.animal Do a search of your file for "animal =" and tell me what you find and if you still have a problem.
-
[1.10.2] TileEntity returns wrong values even though they are stored correctly
No I can't. I have to assume the opposite, because if I assume that your superclass does something, then I can assume your code works perfectly.
-
[1.10.2] TileEntity returns wrong values even though they are stored correctly
Because we can totally tell what your superclass does.
-
[1.10.2] TileEntity returns wrong values even though they are stored correctly
https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/entities/TileEntityTanner.java#L174-L189
-
[1.10.2] TileEntity returns wrong values even though they are stored correctly
Packets.
-
[Solved] [1.10.2] Forge Blockstate: Texture choice depends on multiple values
You would need a custom IStateMapper. For example, I needed something like this, so I used two blockstate files and used the mapper to decide which one to load. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/states/StateMapperFlowers.java
-
[Solved] Problem With Loading Model of Blocks With Blockstates
- Preventing Cascading Worldgen with Large, Randomized Structures
Actually.... You want [inside the current chunk] + (8,8) Due to the way Minecraft generates chunks, you want to always offset by 8 blocks in the positive X and positive Z directions. The next chunk in that direction are guaranteed to already exist.- Random drops from block
You can't. At some point, somewhere, you have to specify what you want dropped.- Syncing Capabilities through packets returns Casting exception.
http://mcforge.readthedocs.io/en/latest/networking/simpleimpl/- [SOLVED] Exception loading model for variant
The tripwire probably has a non-default IStateMapper. For example, this block: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/block/BlockOreFlower1.java#L114 Has 3 properties. But you'll notice that one of them is distinctly missing from my blockstate file: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/oreflowers/blockstates/oreflowers1.json That's because this class handles it: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/states/StateMapperFlowers.java In my case, the property splits across two blockstate files, but other options are available as well (such as outright ignoring it). You'll have to dig around for the one Vanilla uses for the tripwire. You then call ModelLoader.setCustomStateMapper(block, mapper); to register it.- Overriding onEntityWalk on vanilla blocks
You can't. You would need to use an event handler and check which block the entity is standing on.- [SOLVED] Exception loading model for variant
veganism:hemp_tripwire#attached=false,disarmed=true,east=false,north=true,powered=false,south=false,west=true for blockstate "veganism:hemp_tripwire[attached=false,disarmed=true,east=false,north=true,powered=false,south=false,west=true]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model veganism:hemp_tripwire#attached=false,disarmed=true,east=false,north=true,powered=false,south=false,west=true with loader VariantLoader.INSTANCE, skipping Your block has a "disarmed" property but your blockstate file lacks it. Also, you might be interested in using the Forge Blockstate format http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/ Which doesn't require you to fully specify every possible combination of states. For example I have a block with three properties: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderfarming/blockstates/tanner.json#L17 The facing indicates the rotation, the other two properties specify a submodel (although they could specify anything other than rotation). Forge then automatically combines these.- TrapItem for mob
That will spawn it exactly on top of the player. Probably not what you want, but yes.- TrapItem for mob
There's a few other things to do, as well, such as setting the entity's position. But largely, yes. Take a look around the vanilla code for some other examples of that function in use (right-click -> references -> find in workspace)- TrapItem for mob
World.spawnEntity(...)- Advancement NBT question?
In the code that modifies that integer (I mean...you wrote it...)...check to see if that integer is greater than the desired number and if so, give the player the advancement (check vanilla code for how to award advancements).- [1.12.1] Textures are not shown.
I doubt the veracity of this statement. You can prove me wrong by posting your code.- [1.11.2] There is no Z depth
I love how your screenshot is completely useless (the fuck does "he turned face" (this isn't even a sentence!) and this cropped screen shot have to do with each other?). Fuck if I can tell what's wrong with your code snippet based on that screenshot.- Why are texture pack files null?
It looks like it's been through a hash algorithm because Mojang obfuscates the source code. All field names, class names, and method names get replaced with single-letter abbreviations, then two-letter, then three-letter, and so on until there aren't any more to replace. As for complex...well yeah, it has to be. Minecraft as a game is complex and incredibly flexible.- [1.12] Crash when trying to use ObjectHolders
I thought I said that... Oh, I did.- TrapItem for mob
Ok, so. 1) It looks like you are storing the entity's name in a class field. You can't do this, Items are singletons. 2) You need to check whether or not you've already stored an entity or not, and if you have, do something different 3) Figure out how to spawn cows, then work out how to genericize it.- Playing a sound event when player is in range of an entity
How does EventPriority.HIGHEST solve the client-vs-server issue? I'll give you one hint: It does fuck all about it.- [1.12] How to have a ticking variable for a mob without overriding the mob?
Read the javadoc- [1.12] How to have a ticking variable for a mob without overriding the mob?
They're longs. Do subtraction. - Preventing Cascading Worldgen with Large, Randomized Structures
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.