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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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