-
Posts
1773 -
Joined
-
Last visited
-
Days Won
61
Everything posted by V0idWa1k3r
-
You need to fetch the color stored in your TE, since you can't store enough in the metadata.
-
[1.12.2]apply offset in item json texture layer
V0idWa1k3r replied to perromercenary00's topic in Modder Support
You can't apply an offset to the texture. You can either have a custom model with your desired offset or a texture that has said offset. If you want your item animated in the process you can either use multiple textures like minecraft's bow does it or use forge's animation api. -
You would need a TESR for that, in that TESR chack the distance to the client's player and render it if the distance is less than the distance you want. And yes, you can render a BakedModel in a FastTESR.
-
It can't because you have a syntax error that you've posted. From the looks of the error you are passing wrong arguments to the method. See the method parameters and pass what it wants.
-
Yes. What is the mysterious "it"? The compiler? The IDE? The game? If it's the first two then you should be able to fix it, since it's just a compile error and those are easily fixable with some java knowledge. If it's the latter then post the error log.
-
You are not including the color in your state here. What is your issue? Are item textures not there? Or those of blocks? If it's blocks then see above, otherwise you need to show how you are registering models for your itemblocks.
-
How do I store entities as a data on an Item
V0idWa1k3r replied to TheRPGAdventurer's topic in Modder Support
You can't store information that is per itemstack in item fields since items are singletons. First of all the second parameter in NBTTagCompound#getTagList is not it's limit, it's the type of tag in said list. Second of all you need to account for a case where the list is not present in the tag, or the stack has no tag at all. Currently your list will be null in 2/3 cases. wasn't your point to store the dragon's UUID in a list? Why are you storing it in the item's tag? You are also not storing the list in the tag, so this Which you first need to initialize a lot like you do your nbt variable. is still the case. -
How do I store entities as a data on an Item
V0idWa1k3r replied to TheRPGAdventurer's topic in Modder Support
-
How do I store entities as a data on an Item
V0idWa1k3r replied to TheRPGAdventurer's topic in Modder Support
WorldServer#getEntityFromUuid -
Did you set up your repository? We would need to look at your code and the blockstates/model file to see what's wrong.
-
[1.12.2] intestack capability not sync to remote world
V0idWa1k3r replied to perromercenary00's topic in Modder Support
-
[1.12.2] intestack capability not sync to remote world
V0idWa1k3r replied to perromercenary00's topic in Modder Support
These reasons are the reasons I told you to use the share tag mechanics to sync your capabilities. -
[1.12.2] intestack capability not sync to remote world
V0idWa1k3r replied to perromercenary00's topic in Modder Support
I would advise to use the share tag mechanics, but if you absolutely must use packets here is a guide. -
https://github.com/V0idWa1k3r/ExPetrum/blob/master/src/main/java/v0id/api/exp/data/ExPRegistryNames.java It's just a collection of strings that are made into ResourceLocations on demand.
-
This question answers itself. You do so by instantinating the SoundEvent first, then the SoundType. I don't think I could explain this in a more obvious way, sorry.
-
No, the cause of the crash is because the object is instantinated before your sound event is. It can be static all you want, it's the instantination that matters. Hence the name - static initializer. That is correct. The proxy in your case is useless but in general case it isn't, you are just doing it wrong. Don't use a CommonProxy, use an interface, like an IProxy as the official docs tell you to do.
-
To register custom sounds you also need a sounds.json in your assets/modid folder like I do here. You can read up on it's format more here, on the official minecraft wiki. You will of course need to register the SoundEvent within the appropriate RegistryEvent similar to how I do here. Make sure your registry name matches the one you have given to the sound in the sounds.json file. To actually obtain a reference to your SoundEvent to use it later(to play it for example) you would use ObjectHolders like I do here. After that you should be able to play your sound just fine similar to how I do here. As for your repo: Don't do this. Use the registry provided to you by the event. https://github.com/wsman217/Learning-Mod/blob/master/src/main/java/com/wsman217/learningmod/init/ModBlocks.java#L15 https://github.com/wsman217/Learning-Mod/blob/master/src/main/java/com/wsman217/learningmod/init/ModItems.java#L40 Don't use static initializers. Instantinate your stuff directly in the appropriate RegistryEvent. https://github.com/wsman217/Learning-Mod/blob/master/src/main/java/com/wsman217/learningmod/blocks/BlockBase.java BlockBase/ItemBase/XBase is an antipattern. There is already a BlockBase, it's called Block. https://github.com/wsman217/Learning-Mod/blob/master/src/main/java/com/wsman217/learningmod/proxy/CommonProxy.java CommonProxy makes no sense. Proxies exist to separate sided-only code. If your code is common it goes anywhere but your proxy. This makes even less sense. A server proxy provides noop implementations for client-only methods or invokes methods that would crash the physical client. A common proxy by definition can't be your server proxy. https://github.com/wsman217/Learning-Mod/blob/master/src/main/java/com/wsman217/learningmod/util/IHasModel.java IHasModel is stupid. All items need models, no exception, and nothing about model registration requires access to private/protected data. Register your models in the ModelRegistryEvent directly. https://github.com/wsman217/Learning-Mod/blob/master/src/main/java/com/wsman217/learningmod/sounds/SoundTypes.java#L13 And here is the cause of your issue - the dreaded static initializers. By the time this is constructed your SoundEvent is still null, hence your crash.
-
[1.7.10] Crafting Recipie with mod items
V0idWa1k3r replied to LaplandKing's topic in Modder Support
1.7.10 is no longer supported on this forum. Update to a modern version of minecraft to receive support. -
Entity tracking is the process of sending entity data to the clients who need it(as in are in range of the entity defined within the tracker method). EntityDataManager is responsible for syncing the data to the clients. You can add your own data to sync for your entity via a usage of DataParameters. updateFrequency is the frequency at which the data is sent to the client. sendVelocityUpdates is self-explaining.
-
First of all NEVER EVER register things like this. If you have to access the registry directly then you are doing something VERY wrong. Use the appropriate RegistryEvent.Register<T> event and use the registry provided to you in that event. Second of all this is not enough information for the EntityEntry. You at the very least also need to provide the tracker data and the registry name/ID. Thirdly don't construct EntityEntries directly. Use EntityEntryBuilder. Your entity doesn't exist on the client because you didn't register it correctly.
-
Considering that you need to do this on client only the best course of action would be to set the value of GameSettings.keyBindDrop field to your custom implementation that returns false when needed in KeyBinding#isPressed.
-
You need to provide some of your code so we can help you. Ideally you would provide a github of your mod but at the very least the renderer class, the method where the renderer is registered and the method where the entity is spawned would suffice with us likely asking for more relevant information later. Judging by the fact that the entity is invisible likely the problem lies in your renderer, or, alternatively the entity isn't spawned and thus simply doesn't exist in the world but without any code I can't say much more.
-
[1.12.2] intestack capability not sync to remote world
V0idWa1k3r replied to perromercenary00's topic in Modder Support
A property for an Item? Why? Don't use raw types. ICapabilitySerializable is generic, so you need to specify the type. As for the issue: Capabilities on items are not synced to the client by default. If you wish to sync them you need to either use packets or override Item#getNBTShareTag and write your synced data there and Item#readNBTShareTag to read the data. I am not too sure why the values are updated on the client after relogging though, I guess forge sends the initial capability data to the client too. If you don't want the data to persist at all don't implement ICapabilitySerializable. -
How do I store entities as a data on an Item
V0idWa1k3r replied to TheRPGAdventurer's topic in Modder Support
Obviously not as you can't store anything per instance of ItemStack in a field in an Item class since items are singletons. NBTUtil.createUUIDTag/NBTUtil.getUUIDFromTag