-
Posts
1773 -
Joined
-
Last visited
-
Days Won
61
Everything posted by V0idWa1k3r
-
Don't. As for the issue - those are syntax errors and your IDE is telling you what's wrong. If you have no idea how to fix a syntax error then you need to learn java.
-
[1.12.2] problem with sending fluidtank to client
V0idWa1k3r replied to Tieso2001's topic in Modder Support
ByteBufUtils(or ByteBufUtil) is a helper class that allows you to write/read NBT to/from a ByteBuffer. Well, there is only one player on the client... (Minecraft.getMinecraft().player) -
By default the fog density mode would be linear. You would need to change it to exponental using GlStateManager in your density hook. I also believe that the density for lava is 2, not 1.
-
Show your startup log, it should contain an error regarding the model issue.
-
Yep, exactly that.
-
What is 251 / 255? It's 0. What is 251 / 255F? It's 0.9843...F
-
I could swear that there was a thread a page back with somebody having this same issue. In java everything is passed as a reference(kinda, it's a bit different but I won't complicate stuff). Thus when you get the item stacks from the results of your recipe and blindly put them in the output slot it is still THE SAME ITEM STACK that is stored in your recipe map. Any modifications to it apply to the stack in your recipe. Also some misc. issues: Don't use get/setField, that is a silly vanilla mechanic. Simply reference your fields directly. I have a suspicion that you are doing the stupid invalidate/validate tileentity stuff there. Don't. Simply override TileEntity#shouldRefresh. Why? You are just wasting a CPU cycle at that point. Doesn't really matter, but still, why?
-
Since minecraft modding is complicated there really isn't a documentation. Learn by reading through the code others have made and understanding it. Look at vanilla's code first, then start looking at open-source mods on github. There are example mods too, like Cadiboo's example mod. For the love of everything that is holy don't ever think about watching those terrible youtube tutorials though.
-
Well, show what you have tried. I gave you a link. Scroll down a bit and there will be an example. It starts with a line in bold saying Simple example: 2D beds
-
[1.12.2] Creating an Entity with OBJ model?
V0idWa1k3r replied to Thegametutor101's topic in Modder Support
So basically what you want to do is a little workaround the issue of not being able to render the OBJ models for an entity by using forge. Forge has a system for loading the OBJ models for item/block models. In actuality it converts the OBJ vertices into a format that the game understands but that's an implementation detail. You also know that the game can render items in various forms, like when you toss an item on the ground it renders in the world as a 3D model. If said item were to have an OBJ model assigned as it's model then when you toss the item said OBJ model would render in world, which is kinda what you want in the end. So, the logical place to look would be RenderEntityItem which is the class responsible for actually rendering the item in the world to see how it is doing it. The problem however is the fact that it gets the model to render in world from the ItemStack, which contains the item. There are ways around that, sure, you can have independent IBakedModel instances but that is complicated, so the simple option is to have an item that is assigned the OBJ model you want to use and simply do the same RenderEntityItem does but instead of getting the ItemStack from the entity pass it a constant ItemStack that contains the item that has the model assigned. As for which texture to use - minecraft stiches all item/block textures together into a singular image for performance reasons. So you would just use that image as your texture and I am pretty sure RenderEntityItem has a reference to that image. -
Well, you would need to make your model file comply with the minecraft model json schematics, which I've linked.
-
[1.12.2] Creating an Entity with OBJ model?
V0idWa1k3r replied to Thegametutor101's topic in Modder Support
I am not being arrogant, you are just making mistakes that make no sense. The purpose of you being here is to learn and first step to learning is understanding your wrongs. Like here, in the screenshot attached you are using a wavefront object MODEL file as your TEXTURE location. This makes no sense and you should understand that just by looking at it and thinking "So I need to bind a texture, which is an image file in it's nature but here I am telling the game to bind an obj model file(which is just a text file) as a texture". I do understand that you are new to modding(in which case you should probably start with something simpler than implementing a feature that is not supported) but these are just mistakes that need a bit of logic to understand and you should always apply logic to programming, otherwise you are not really programming, are you? I am sorry if I sound arrogant, I just wish for people to learn, otherwise they will keep coming back here with every tiny thing. You also keep doing only half of what I am telling you to do. -
Don't attach your files like that, use services like github. Just by the names of the files alone I can tell that you are using terrible practices though. Don't have an ItemBase class. There is already an ItemBase, it's called Item. Don't abuse inheritance. Don't use static initializers. All registry entries must be instantinated in the appropriate registry event. Don't use IHasModel, it is stupid since all items need models and it makes you write much more code than you would if you wouldn't have used it. Your model file is not a valid minecraft model file. https://minecraft.gamepedia.com/Model#Item_models
-
You have shown None of your code No blockstates/model file No debug log So the best I can do is stab at the dark Have you registered the model for your idem? Do you have the model file in the right location? If you are using forge's blockstates for said item is the blockstates file correct?
-
[1.12.2] Creating an Entity with OBJ model?
V0idWa1k3r replied to Thegametutor101's topic in Modder Support
This is a header file for C++. Why would you search for an obj parser for C++ I have no clue. No. Register the OBJ model as a model for one of your items, then do the same RenderEntityItem does for rendering the resulting IBakedModel. I don't think a better explanation is possible. I gave you the class name that does the rendering. All you have to do is open said class's sources using the IDE of your choice and see how it is done there. -
[1.12.2] Creating an Entity with OBJ model?
V0idWa1k3r replied to Thegametutor101's topic in Modder Support
Look up the wavefront format on a wikipedia, write a parser. This is not so much of a minecraft issue as a general coding issue. -
[1.12.2] Creating an Entity with OBJ model?
V0idWa1k3r replied to Thegametutor101's topic in Modder Support
OBJ models for entities are not supported/implemented. You would either need a custom wavefront parser/uploader or you would register the OBJ model for an item and render the resulting IBakedModel in the same way RenderEntityItem does that. -
FogColors likely expects the colour values to be within a [0-1] float range, not a [0-255]byte one
-
Since your age property is a custom one you need to override Block#fillStateContainer and add your property to the builder.
-
[1.13.2] [Solved] PlaySound is High Pitched
V0idWa1k3r replied to FireController1847's topic in Modder Support
By default the placement sound is played at 80% pitch in all methods it is referenced by (aka it goes like sound.getPitch() * 0.8F). You are playing it at 100% -
[1.12.2] Player at normal speed when sneaking
V0idWa1k3r replied to Seynox's topic in Modder Support
Use a FOVUpdateEvent -
So, you know the issue, you know what it is cause by and know how to fix that. Or at least this statement indicates that you do. All that's left is to fix it. Add those parameters to your blockstates file.
-
[1.12.2] problem with sending fluidtank to client
V0idWa1k3r replied to Tieso2001's topic in Modder Support
What is this? Why are you doing this? I told you what you needed to do Why did you create a custom PacketBuffer implementation? You don't need it, discatd it and don't do that pretty much ever again. Your statement conflicts your implementation. Your implementation works as if the client is sending the fluid stack to the server(don't ever do that either by the way). An IMessage implementation must have a parameterless constructor. Which the error report is telling you. Learn to read the error report, in 90% of cases the issue is stated right in it.