Jump to content

[1.10.2] Model acting different depending on dimension


Selim_042

Recommended Posts

Depending on if my model is in the overworld or the end it looks different.  In the overworld, the endstone texture is completely blacked out, and if the end it works just fine.

DMKSohD.png

RdLSzqr.png

Model file:

{
    "parent": "block/block",
    "textures": {
        "particle": "blocks/end_stone",
        "endstone": "blocks/end_stone",
        "ore_overlay": "selimrandomstuff:blocks/onyxore"
    },
    "elements": [
        {   "from": [ 0, 0, 0 ],
            "to": [ 16, 16, 16 ],
            "faces": {
                "up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#endstone", "cullface": "up" },
                "down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#endstone", "cullface": "down" },
                "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#endstone", "cullface": "north" },
                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#endstone", "cullface": "south" },
                "west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#endstone", "cullface": "west" },
                "east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#endstone", "cullface": "east" }
            }
        },
    {
    	"from": [ 0, 0, 0 ],
            "to": [ 16, 16, 16 ],
            "faces": {
                "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#ore_overlay", "cullface": "up" },
                "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#ore_overlay", "cullface": "down" },
                "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#ore_overlay", "cullface": "north" },
                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#ore_overlay", "cullface": "south" },
                "west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#ore_overlay", "cullface": "west" },
                "east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#ore_overlay", "cullface": "east" }
            }
        }
]
}

I assume the problem isn't here, but here is the block class:

package selim.randomstuff.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import selim.randomstuff.ModInfo;
import selim.randomstuff.SelimRandomStuff;

public class BlockOnyxOre extends Block {

public BlockOnyxOre() {
	super(Material.ROCK);
	this.setRegistryName("onyxore");
	this.setUnlocalizedName(ModInfo.ID + ":" + "onyxOre");
	this.setCreativeTab(SelimRandomStuff.randomThingsTab);
}

}

 

I have a feeling it is a dumb little thing I am forgetting as I have done similar things before and fixed it, just can't see where when I look back.

Link to comment
Share on other sites

Why not just use a new texture for the block, instead of having to use endstone with an ore overlay?

 

Unless there is something I do not know, and 1.10.2 forces you to do this... (I have a 1.10.2 mod with ores so you do not need to do this...?)

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Why not just use a new texture for the block, instead of having to use endstone with an ore overlay?

 

Option A:

- 192 textures for [material] + [ore]

Option B:

- 12 material textures + 16 ore overlays

 

Hmm...

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Well I must be stupid, or missing something. I do not understand

Why not just use a new texture for the block, instead of having to use endstone with an ore overlay?

 

Option A:

- 192 textures for [material] + [ore]

Option B:

- 12 material textures + 16 ore overlays

 

Hmm...

What-so-ever, so I must be an idiot

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Wait, so why do you need 16 images per ore/block?

 

Am I totally out of the loop???

I Love To Help People. Unless They Are The Kind Of People Who Just Doesn't Know Anything. Those People Need Some Serious Help. This Could Help But......

https://www.youtube.com/watch?v=6t0GlXWx_PY

 

ThingsMod Git: https://github.com/EscapeMC/Things-Mod-1.10.2

 

TeamMadness Mod Git: https://github.com/EscapeMC/TeamMadness-Mod-1.10.2

 

If I somehow help you, please click the "Thank You" button. If I am a total waste of time, please click the "Applaud" button.

Link to comment
Share on other sites

Wait, so why do you need 16 images per ore/block?

 

My usage is different from Selim's.  But if you're making ores that you want to be made of any material (gravel ores, sand ores, sandstone ores, granite, diorite...) then you need to have a base+overlay if you want to match altered textures in the case of resource packs.  You always want your overlay to paste on top of whatever the "stone" block is.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I am not understanding how that's even working in the first place.

 

When you got 2 overlaping texture faces it should cause Z fighting.  Might be that your graphic card picks one tex over the other depending on some random thing.

 

You should always see both textures going in and out between each other.

 

My guess is your problem is at different heights/positions one texture takes precendece over the other.

 

 

 

 

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Since both occupy same space you should get glitches.

 

I mean to make sense of what you're trying to do  I'd make the overlay cube a tiny bit bigger like 0.01 bigger but keep uv mapping same so stretch the tex by 0.01 i think you uv lock all faces. This will prevent the overlay cube to be in the same space as the block cube.

 

Then you'd need to enable cutout rendering for the block like leaves does. Then all transparency will be cut out. Like leaves does.

 

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Is it always blacked out in the overworld? Is it always perfect in the end? What about the nether?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Wait, so why do you need 16 images per ore/block?

 

Am I totally out of the loop???

 

the main reason you don't wanna use 16 images or pre-set variations textures is tex packs!

 

If you install a modpack all your custom textures will not be compatible and your ore will look vanilla. Re-using in game textures is way  smarter and your mod becomes insta compatible with any texture pack.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

It is black in the nether as well.  I have other blocks that work the same way with overlayed textures that work just fine, but they emit light.  That could be the reason they aren't doing this if it is actually because of issues with block light.

 

What I'd recommend doing then, is looking at the WorldProviders for the dimensions. Look for things that are in both the Nether & End providers , but aren't in the Overworld provider. It may help narrow down the cause.

Link to comment
Share on other sites

What I'd recommend doing then, is looking at the WorldProviders for the dimensions. Look for things that are in both the Nether & End providers , but aren't in the Overworld provider. It may help narrow down the cause.

I assume you meant Overworld and Nether, those are the ones that are the same, End is different.

 

 

try this in your constructor

this.useNeighborBrightness = true;

Nope :(

Link to comment
Share on other sites

Pretty sure your issue  is what I said above. Putting 2 blocks one inside the other with overlapping faces should cause tex flickering. Maybe your card makes the decision to put both in order in lighter environments and to blend the two textures in darker environments. On my system the texture flickers between the two whenever i have overlapping faces.

 

Rule of thumb is you cannot have 2 textures occupying the same space. Which you still do even after it works now. . You may still get reports from people that your ore tex is flickering when you release it. Hopefully not. 

 

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

tex is flickering

 

That's called z-fighting and that is not what is happening here.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Pretty sure your issue  is what I said above. Putting 2 blocks one inside the other with overlapping faces should cause tex flickering. Maybe your card makes the decision to put both in order in lighter environments and to blend the two textures in darker environments. On my system the texture flickers between the two whenever i have overlapping faces.

 

Rule of thumb is you cannot have 2 textures occupying the same space. Which you still do even after it works now. . You may still get reports from people that your ore tex is flickering when you release it. Hopefully not.

You do realize that vanilla grass blocks do the same thing right?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Minecraft java and forge seem to have it out for me, any ideas? I have had issues with exit code 1 while loading forge -fabric was having the same issues, but I seemed to fix it in these repairs? (tried different versions upwards from 1.19 to 1.20.2 for forge, nothing worked and I'm confident older versions wouldn't either) -The launcher itself loads fine, it will load the game within the launcher, and then crash the moment it tries to load outside of the launcher. I have tried the default launcher, legacy launcher, and the curse forge launcher, none have worked! (all have had the same problem) I think this started when I took a break and upgraded to windows 11 and wonder if that changed anything? I have tried the following: uninstalled & reinstalled java, (I have having issues where I download jdk 17 but only 8 would show up (would not show up anywhere but the control panel, not even the official uninstaller, I *think* I got that fixed) tried jarfix uninstalled & reinstalled minecraft tried alternate launchers -forge & legacy, & repaired them too. tried without mods updated game drivers uninstalled and reinstalled forge -including completely wiping it from my system changed java excutable path followed everything in the error code 1 post completely reset my pc I tried to change the launch path but couldn't seem to get it to work -the default launcher wont let me even see properties as an option, i have yet to try with the other two (i did try on legacy but it was being weird) I want to include my debug log; but its over the max size? sorry my brains gone numb from trying to fix this for the past 2 days
    • I personally create registries using DataPackRegistryEvent.NewRegistry. It's pretty powerful as long as you know how to make codecs. In some class, make a registry key like so: public static final ResourceKey<Registry<MyDataType>> MY_REGISTRY = ResourceKey.createRegistryKey(new ResourceLocation(MyMod.MOD_ID, "registry_name")); This will make a registry that holds objects of type "MyDataType". JSON files stored in data/<datapack_namespace>/modid/registryname/ will be parsed and put into this registry. Note that the directory structure has a folder named after your mod inside your datapack directory, so the actual path would look like: data/my_mod/my_mod/registry_name (or if another mod uses your registry: data/their_mod/my_mod/registry_name. To register this registry, subscribe to the DataPackRegistryEvent.NewRegistry event on the MOD event bus and call event.dataPackRegistry() for every registry you have. An example of what I'm doing for my mod (this is in the constructor for the main mod file): IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); bus.addListener((DataPackRegistryEvent.NewRegistry event) -> { event.dataPackRegistry(ModRegistries.INSULATOR_DATA, InsulatorData.CODEC); }); CODEC is a public static field inside the class for the custom data type I am registering. It holds a Codec<InsulatorData> that tells Minecraft how to serialize/deserialize the data. Most of my data so far can be represented by records, so I use RecordCodecBuilder.create() to do this: public static final Codec<InsulatorData> CODEC = RecordCodecBuilder.create(instance -> instance.group( // Yadda yadda ).apply(instance, InsulatorData::new)); What exactly to put here depends on what you're trying to do, so that's up to you. But basically you're just defining a list of codecs that correspond to the parameters of the record (data type). Most primitive data types have records in the Codec class (ex. Codec.INT) that you can use, and other classes like ResourceLocation have their own codecs as a static field (ex. ResourceLocation.CODEC). Hopefully this is what you're looking for, and that this helps.
    • Good days  I finnaly manage to fix and get a working gui from BlockItem and from BlockEntity the next issues i have to fix is this the block Entity model for some reason is moved to the south west  this briefcase model must be centered but is moved to a side, i have nothing weird in the code but this is happening // ########## ########## ########## ########## @Override public RenderShape getRenderShape(BlockState blkstate) {     return RenderShape.MODEL; } the block model is out of place However The hitBox of the block is right in place   ########################################################################################################### This next issue  Mi gui also adds the 5 slots from the player equipment the thing is theres no filter to determine whats can be put in an armor slot and what not      i have this method that draws the slots for the armor, the part i dont get i slike wheres the code that responds when you set an item in a item slot to do checks and allow the item to be set or not  //########## ########## ########## //Draw Player Armor private void addPlayerArmorSlots(Inventory playerInventory) { // 36 this.addSlot(new Slot(playerInventory, 39, 8, 8)); this.addSlot(new Slot(playerInventory, 38, 8, 26)); this.addSlot(new Slot(playerInventory, 37, 8, 44)); this.addSlot(new Slot(playerInventory, 36, 8, 62)); this.addSlot(new Slot(playerInventory, 40, 26, 53)); }   theres must be a method that triggers when you set a itemstack inside an slot and allows to do a check if its a valid item for that slot                                             
    • No like how do I use my new PreperableReloadListener, I know how to set it up now and register it, I just need to know how to use it in other classes.
    • Completely out of the blue my forge loader is lagging, although at 120 fps. Like when I turn it lags, or hit mobs it lags, or run sometimes although staying at 120 fps. I found another person having a similar problem:  But there was no solution I dont think. I tried everything from: 1. Updating my computer 2. Updating/reinstalling forge 3. Testing if allocated memory was problem (if it was low or high or mid nothing changed) 4. Adding various performance mods 5. Deleting most of my profiles if storage was a problem.   Really not sure what to do next or if forge is just broken for ever for me now.  
  • Topics

×
×
  • Create New...

Important Information

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