Jump to content

[1.10] Transparent Block makes everything behind him also transparent


Recommended Posts

Posted

Hello Dear Forum,

 

I Updated yesterday my MOD to 1.10, i got in there a "Transparent" Block,

 

now after setting him on the ground it does everything transparent, i mean even the blocks

under him(you can look through).

 

http://www.fotos-hochladen.net/view/20161029103pb8wj1efqi.png

 

20161029103pb8wj1efqi.png

 

i think its a json file problem (Some ppl told me that json files are different now but im watchin the new ones and there is no difference, or am i blind?

 

blockstates.transparent64x64

{
"variants": {
	"normal": { "model": "blockupdate:transparent64x64" }
}
}

 

item.transparent64x64

{
"parent": "blockupdate:block/transparent64x64",
"display": {
	"thirdperson": {
		"rotation": [ 10, -45, 170],
		"translation": [ 0, 1.5, -2.75],
		"scale": [ 0.375, 0.375, 0.375]
	}
}
}

 

block.transparent64x64

{
"parent": "block/cube_all",
"textures": {
	"all": "blockupdate:block/transparent64x64"
}
}

Posted

Show the Block class, maybe you are missing one of the isFullCube() or isFullyOpaque() methods

 

 

i dont think so,

 

i mean, its the same as in 1.8.9 i think

 

public class BlockUpdateGlassClass extends Block{

 public BlockUpdateGlassClass(String unlocalizedName, Material materialIn, float hardness, float resistance){
 super(materialIn);
 this.setUnlocalizedName(unlocalizedName);
 this.setCreativeTab(CreativeTabs.MATERIALS);
 this.setHardness(hardness);
 this.setResistance(resistance);
 }

public boolean isOpaqueCube() { 
	return false; }

    public boolean isFullCube() { 
    	return false; }

    @Override
    public boolean isVisuallyOpaque() { 
    	return false; }
    
    @Override
    public BlockRenderLayer getBlockLayer(){
        return BlockRenderLayer.TRANSLUCENT;
    }
}

Posted

i think your opaque has to be true ?

 

if i understand correctly, your block is a glass block

and glass itself only has isFullCube set to false

 

 

dont work sadly, just tried it out :/, i playd around with the other options too but still isnt working

Posted

Add @Override to your methods, to make sure you actually override these (naming is correct).

Return false on isFull, isOpaque and isFullyOpaque (yes there are a lot of same pointless methods now).

 

already did , dont work either :/

Posted

already did , dont work either :/

 

Define "didn't work" because your method signatures are wrong.

 

	@Override
public boolean isOpaqueCube(IBlockState state) {
	return false;
}

@Override
public boolean isFullCube(IBlockState state) {
	return false;
}

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.

Posted

public boolean isOpaqueCube(IBlockState state)

is not the same as

public boolean isOpaqueCube()

 

Minecraft uses the former.  You have the latter, it will never be called.

This is why you put @Override on it and Eclipse tells you to remove it. Removing it isn't the solution, fixing the method signature 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.

Posted

public boolean isOpaqueCube(IBlockState state)

is not the same as

public boolean isOpaqueCube()

 

Minecraft uses the former.  You have the latter, it will never be called.

This is why you put @Override on it and Eclipse tells you to remove it. Removing it isn't the solution, fixing the method signature is.

 

 

alright, well it work now excellent with your method which you mention one up.

 

thank you very much!

Posted
A method signature is part of the method declaration. It is the combination of the method name and the parameter list.

 

The reason for the emphasis on just the method name and parameter list is because of overloading. It's the ability to write methods that have the same name but accept different parameters. The Java compiler is able to discern the difference between the methods through their method signatures.

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.

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



×
×
  • Create New...

Important Information

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