Everything posted by TheGreyGhost
-
How the hell do you friggin load .obj things or whatever
Hi One example project you might find useful is this one, I've written it to give working examples of the basic stuff in forge. It's not completely converted to 1.15 yet but it does many of the basic things you will need to know. https://github.com/TheGreyGhost/MinecraftByExample -TGG
-
(BLOCKBENCH) Can't animate mobs?! help!
Nice model What do you mean "doesn't work"? I.e. the export fails completely, or does it produce a file that doesn't work when you try to import it into something else? -TGG
-
How the hell do you friggin load .obj things or whatever
Ah. You're using 1.14. Any reason you're not using 1.15? I wrestled with it for a while but I couldn't get it to load properly. It either sticks .json on the end of the .obj filename or it doesn't load at all. I can't figure out how the object loader is supposed to be invoked. Sorry dude, unless you update to 1.15 I'm out of ideas. -TGG
-
How the hell do you friggin load .obj things or whatever
OK I'll have a look and get back to you... -TGG
-
Variable Entity Type
Hi I had a quick look at EntityType class and this looked interesting- public static Optional<EntityType<?>> readEntityType(CompoundNBT compound) { return Registry.ENTITY_TYPE.getValue(new ResourceLocation(compound.getString("id"))); } i.e. you can get the EntityType from a CompoundNBT, which you can copy from your event.getEntity(), and then spawn the entity as normal Haven't tried it, but it looks promising. -TGG
-
How the hell do you friggin load .obj things or whatever
Hi Short answer is: lots of things can cause this If you post a link to a github I'll fork it and see if I can find any more clues. -TGG
-
1.14.4 - How to make a crafting recipe to NOT mirror?
Hi Based on the code in ShapedRecipe.matches(), which hard-codes checking for the mirrored version, I think the only way is probably to register your own recipe handler which is more or less an exact copy of ShapedRecipe but omits the mirror check. There appears to be a registry of IRecipeSerializer which looks promising i.e. you create your new NonMirroredSerializer and register it in the appropriate event, probably something like @SubscribeEvent public static void onItemsRegistration(final RegistryEvent.Register<Item> itemRegisterEvent) { @SubscribeEvent public static void onRecipeRegistration(final RegistryEvent.Register<IRecipeSerializer<?>> recipeRegisterEvent) { recipeRegisterEvent.getRegistry().register(mySerializer); } That's just a pure guess on my part, haven't tried it out, but I think it's worth a try -TGG
-
[1.14.4] Z fighting issues with semi-transparent entity layers
Hi Based on my efforts in previous versions, I think using TextureManager.getDynamicTextureLocation() to create a new DynamicTexture is the likely best way. Based on the map renderer, it looks like you could call getDynamicTextureLocation() immediately before rendering your wolf for the first time. i.e. 1) Is this the first call for this wolf pattern? (If not - use cached texture) 2) call getDynamicTexture() to get a dynamic texture with RL "wolf1" or "wolf2" or whatever 3) modify the texture's NativeImage to your wolf's pattern 4) Bind your renderer to that texture RL, exactly as if it were a static texture eg IVertexBuilder ivertexbuilder = bufferIn.getBuffer(RenderType.getEntityTranslucent(resourceLocationForThisWolfPattern)); or public ResourceLocation getEntityTexture(WolfEntity wolfEntity) { return wolfEntity.resourceLocationForThisWolf() } -TGG
-
Confused since 1.15.2
Hi Some general advice from a guru https://gist.github.com/williewillus/353c872bcf1a6ace9921189f6100d09a But actually the specific answer to your question is that item sub-types don't exist any more. Each sub-type is now a completely separate Item instance. That page I linked to talks about it further. If you want to see a working example of how Items with sub-types work now, you might find this useful https://github.com/TheGreyGhost/MinecraftByExample See mbe11 Cheers TGG
-
1.15 Model rotation messes with UVs
Hi I think SimpleModelTransform is not suitable for what you're trying to do. I suspect you need one which lets you control isUvLock(). You could play around with Variant to see if it does what you want, or you could dig into the Forge/Vanilla code to see what is does when loading vanilla blocks which get rotated. -TGG
-
1.15 Model rotation messes with UVs
Hi I suspect you are using the wrong type of Transform / using SimpleModelTransform in a manner that it wasn't intended. Without seeing your rendering code I'm not sure. -TGG
-
[1.15.2] LivingDeathEvent TrueSource giving NullPointerException
Hi Most likely, if trueSource or heldEquipment is null, it means "not relevant". eg the entity which caused the damage wasn't holding anything. In which case you should check for null first and do some kind of default if it's null Or have I misunderstood your question? -TGG
-
1.14.4 - Create Two blocks with only a different face texture
Hi You could try looking at some of the examples in this example mod eg mbe03 which uses one model and multiple textures https://github.com/TheGreyGhost/MinecraftByExample/tree/master The 1.14.4 version is on this branch: https://github.com/TheGreyGhost/MinecraftByExample/tree/1-14-4-partial -TGG
-
[1.14.4] Custom grass block behaviours
Howdy abdmoh See private message... Cheers TGG
-
[1.14.4] Custom grass block behaviours
Hi I very much doubt you'll find a specific tutorial for this, I think you'll probably have to spend some time understanding the vanilla code. Some of the key words to help your search: Block.canSustainPlant() BushBlock GrassBlock.grow() SpreadableSnowyDirtBlock.tick() -TGG
-
[1.15][Solved]BlockState JSON doesn't recognize model JSON
Hi I think I read somewhere that Forge states have been removed, your documentation may be out of date (that happens a lot) Ah yeah here's the link https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e -TGG
-
Sides problem
Hi If I understand your question correctly- your server will need to remember which client was interested in the GUI and then send the information to them. Or - when the client wants to know the ID, it sends a packet asking for the ID and the server responds. I don't know of any "automatically synchronised" global variables in Forge or Vanilla; but you might look at WorldSavedData, perhaps it can do what you need -TGG
-
[1.15.2 | SOLVED] Get ItemStack attack damage
Hi In that case I think the easier way will probably be to recreate the functionality in PlayerEntity::attackTargetEntityWithCurrentItem() i.e. copy and paste and remove the bits that aren't relevant or that actually do the damage Not ideal because you will need to update it every time Minecraft updates a version, but you'll be doing that for half your code base anyway. -TGG
-
[1.15.2 | SOLVED] Get ItemStack attack damage
Hi I'm not exactly sure what your question is, but I'm pretty sure you'll find the answer in PlayerEntity::attackTargetEntityWithCurrentItem() -TGG
-
[1.15][Solved]BlockState JSON doesn't recognize model JSON
Hi What version of Forge are you using? Even vanilla blockstates look like this now { "variants": { "axis=y": { "model": "block/acacia_log" }, "axis=z": { "model": "block/acacia_log", "x": 90 }, "axis=x": { "model": "block/acacia_log", "x": 90, "y": 90 } } } Your error log clearly shows that it is unable to parse your blockstates properly. It doesn't find any of the "facing" variants and it thinks that your "north" value for facing is a boolean property. -TGG
-
projectile wont render-1.14.4
Hi What do you mean "I can summon the entity"? Have you tried putting breakpoints into your entity constructor? What happens to your entity after it is constructed? Can you tell why it is being constructed and then not added to the list of entities-to-be-rendered? -TGG
-
1.15 Model rotation messes with UVs
Howdy Although I'm not sure exactly what you're trying to do, you might get some useful clues looking at IModelTransform.isUvLock and FaceBakery. -TGG
-
[1.15][Solved]BlockState JSON doesn't recognize model JSON
Hi I think your blockstates json isn't right. Look at mbe03 example in this example project https://github.com/TheGreyGhost/MinecraftByExample eg { "variants": { "facing=north": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue"}, "facing=east": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue", "y": 90 }, "facing=south": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue", "y": 180 }, "facing=west": { "model": "minecraftbyexample:block/mbe03_block_variants_model_blue", "y": 270 } } }
-
Block textures not loading
Hi Try looking at this example project to see the necessary locations of files and what the files should contain- see mbe01 https://github.com/TheGreyGhost/MinecraftByExample -TGG
-
projectile wont render-1.14.4
Hi Izako Yes you're right, it will stop the game every tick. But that doesn't matter because once it is stopped (paused) you can easily find the problem and solve it. If you're not used to the debugger I think it would be very helpful for you to spend some time learning how to use breakpoints, variable watches, and tracing in your debugger. It makes debugging much much easier and it will make your programming experience very frustrating if you don't use it. There are many many great online tutorials, and it really isn't difficult to learn the basics. Cheers TGG
IPS spam blocked by CleanTalk.