Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/14/20 in all areas

  1. Perhaps you can try looking at how the Culinary Construct Mod does its dynamic sandwich itemstack rendering: https://github.com/TheIllusiveC4/CulinaryConstruct.git. HTH
    1 point
  2. Hi The difference is in the VertexBuffer (IVertexBuilder) that you're using to render. You can make faces only render on one side if you have back face culling turned on. Some of the render modes use back face culling, the others don't . Normal solid blocks, using RenderType.SOLID, have faces which are invisible from the back. For example the difference between this public static RenderType getEntitySolid(ResourceLocation p_228634_0_) { RenderType.State lvt_1_1_ = RenderType.State.getBuilder().texture(new TextureState(p_228634_0_, false, false)).transparency(NO_TRANSPARENCY).diffuseLighting(DIFFUSE_LIGHTING_ENABLED).lightmap(LIGHTMAP_ENABLED).overlay(OVERLAY_ENABLED).build(true); return makeType("entity_solid", DefaultVertexFormats.ENTITY, 7, 256, true, false, lvt_1_1_); } and this public static RenderType func_230167_a_(ResourceLocation p_230167_0_, boolean p_230167_1_) { RenderType.State lvt_2_1_ = RenderType.State.getBuilder().texture(new TextureState(p_230167_0_, false, false)).transparency(NO_TRANSPARENCY).diffuseLighting(DIFFUSE_LIGHTING_ENABLED).alpha(DEFAULT_ALPHA).cull(CULL_DISABLED).lightmap(LIGHTMAP_ENABLED).overlay(OVERLAY_ENABLED).build(p_230167_1_); return makeType("entity_cutout_no_cull", DefaultVertexFormats.ENTITY, 7, 256, true, false, lvt_2_1_); } --> .cull(CULL_DISABLE) If you're not familiar with backface culling it's probably worthwhile spending some time to learn a bit about OpenGL, this guide is not too bad to explain the basic concepts of rendering, worth a skim read for key concepts/keywords https://www.glprogramming.com/red/ If you're worried about the back faces for efficiency reasons, I wouldn't bother. Quad rendering is extremely quick. Cheers TGG
    1 point
  3. Actually yes. But only if the player uses the vanilla "recipes need to be unlocked before they can be used" mechanic. I believe you can relock the recipes, although I've never tried. Alternatively, make your own IRecipe implementation which checks whether or not it should be unlocked for the player creating it.
    1 point
  4. In your model JSON, set the "particle" texture to "#texture" (or whatever you want it to be). I went with the vanilla approach of having base models (in /part/) and then my textured models, which the blockstate references. I'm not sure if there is a better way, as I don't think you can pass in texture overrides from the blockstate file. My models are here: https://github.com/Alpvax/AdvancedAutocrafting/tree/1.15/src/generated/resources/assets/advancedautocrafting/models/block
    1 point
  5. I created some modding tutorials, my minecraftforum name is alexcouch. Here is a thread on my tutorials. If you have any questions please don't hesitate to ask here or even on my original thread.
    1 point
  6. Introduction To build your modifications, forge uses Gradle. Gradle is a tool which automates the compilation, deployment and dependencies of your project. Forge ships with it's own version of Gradle, so you don't have to install it yourself. Getting Minecraft Forge You can download Minecraft Forge from the official website: https://files.minecraftforge.net/. Different versions of Forge might have different features, and might work for different versions of Minecraft. All modifications must use a Forge copy matching their Minecraft version. Using a Forge copy meant to be used on a different version of Minecraft *will* crash your game, and might not even compile. In most cases it is sufficient you download the *recommended* version of Forge. The latest version might contain bugs and in general should only be used when you are testing them out, or when you need specific features attached to those specific versions. [*]go to the Minecraft Forge download website [*]Download the source (src) version of the copy you want. You should end up with a single zip archive. [*]Extract the archive. Setting up the workspace You first need to open a console in your Forge directory. On Windows this is done by shift-clicking on the directory and clicking "Open Command Window Here". As mentioned before, Forge uses Gradle, which makes managing your project a whole lot easier. Forge ships with a Graddle wrapper. On Linux this is gradlew and on Windows this is gradlew.bat. If you have Grandle installed you can also simply use gradle. To to setup your workspace and decompile Minecraft execute the following command: gradle setupDecompWorkspace If you do not have Gradle installed, you'll have to replace gradle with ./gradlew or gradlew.bat for Unix/Linux or Windows respectively. Directory structure and files You should now have the following directories: build - Your mod can be found here once it's been built. It'll end up inside /libs. eclipse - this is where the Eclipse IDE project will be located gradle - the Gradle wrapper that ships with Forge src - Your source files go here. Put your code inside /main/java, and your resources inside /main/resources .gradle - Gralde's cache directory Building your modification Once you have written your modification you can build it using the following command: gradle build Same goes here: If you do not have Gradle installed, you'll have to replace gradle with ./gradlew or gradlew.bat for Unix/Linux or Windows respectively. Where to go next Here are some more helpful tutorials: Setting up your IDE for use with Forge
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.