I don't know if you can use NBT with Blocks and you would need to use NBT to store the payer it belongs to so it can check if you are he and allow entry/breakage. If its just a couple types of block you want this for then you could make them TileEntities instead of Blocks and it should be easy
I don't think the cancerous part of the Minecraft fanbase is going anywhere anytime soon. In fact, I've seen a lot of long time Minecraft fans stop playing because the game has changed way too much, which concerns me a little.
If their issue was changes in new updates why not play the older version i pretty much strictly play 1.7.10 and on 1.7.10 servers but i know there are still a few servers out there still running earlier versions and in single player you have access to almost all older versions.
so i open command and type cd "C:\Users\USER\Mod Projects\1.7.10\Workspaced\StructureMappingTool\forge-1.7.10-10.13.2.1291-src" Then i Press enter
(as a short cut you can shift right click in the forge folder and there is an option Open Command Window Here, that will have the same effect as the cd command from a fresh command window)
.
Now just type gradlew setupDecompWorkspace & hit enter
.
Once that has finished
gradlew eclipse
If you've done this and it still isn't working check you have JAVA_HOME variable set in environment and check that your JDK matches your JRE
gradlew setupDecompWorkspace is one command gradlew eclipse is a different command these should be called on forge src folder (has Gradlew.bat inside it)
Edit - if still having problems, have you updated java recently, there was an update about a month back and update broke eclipse and gradlew, had to update JDK aswell and set system variables to match new version
Hmmm the only way i can get my GUI actually on the screen is by calling drawTexturedModalRect(xpos + 220, ypos + 63, 0, 0, xSize, ySize); adjusting it back onto the screen. if its called drawTexturedModalRect(xpos, ypos, 0, 0, xSize, ySize); using the above calculations for xpos and ypos (equivalent of your guiTop and guiLeft) then it draw with my GUI centered in the top left corner of the screen with 75% off the screen only the bottom right corner visible.
I wonder why....
all the same thanks for your help everything is working as desired with the adjusted position values is testing fine
OK, so guiLeft and guiTop is ment to be the top left corner of the Screen??
having sizex set to actual visible pixels of my texture is causing it to be cut in half should i be using full texture pixel width including transparency for this or is there something else that will be causing it
Edit - Solved cut in half issue sizex and sizey are now the number of visible pixels x 2, just a little surprised at how far background had to be shifted to be at center
You can add / subtract some amount from either to move the position of your GUI around.
Now, always use guiLeft and guiTop as a point of reference when drawing things to the screen, and your GUI should remain in the same relative location regardless of screen size.
Oh that makes sense, explains why the background itself doesn't get weird too just the fields text and buttons (all set with values not math).
I've been working on a couple items and tileEntities that draw gui screens and have found myself needing to set the positions of everything twice once for full screen and once for not otherwise nothing lines up if you change between full and windowed screens.
Though this will only work out if the player has the same windowed size and full screen resolution as me when i wrote the 2 cases otherwise...(see attached screenshot).
Is there a way to set this once and have it align correctly regardless of resolution or do i need to write lots more cases for various resolutions instead of just looking at fullscreen or not fullscreen?
how do you think the lang file will work if it says
tile.null.name=Block 1
tile.null.name=Block 2
that's trying to set the key tile.null.name twice not setting 2 different things names, but besides the point try to run a game with more than 1 tile.null.name = crash
0
I don't know if you can use NBT with Blocks and you would need to use NBT to store the payer it belongs to so it can check if you are he and allow entry/breakage. If its just a couple types of block you want this for then you could make them TileEntities instead of Blocks and it should be easy
0
should be part of JDK it tells you right there "C:\Program Files\Java\jre1.8.0_31" JRE is NOT JDK.
Check That system environment variable JAVE_HOME == JDK
This is the details for my JAVA_HOME system environment variable
Variable Name: JAVA_HOME
Variable Value: C:\Program Files\Java\jdk1.8.0_45
1
If their issue was changes in new updates why not play the older version i pretty much strictly play 1.7.10 and on 1.7.10 servers but i know there are still a few servers out there still running earlier versions and in single player you have access to almost all older versions.
0
Check JAVA_HOME variable in system environment is there and correct && Check JRE and JDK versions match (JRE hasnt been updated ahead of JDK)
0
you run the command from a command window that is currently open on the directory that bat is in.
here is location of my gradlew bat
C:\Users\USER\Mod Projects\1.7.10\Workspaces\StructureMappingTool\forge-1.7.10-10.13.2.1291-src\gradlew.bat
.
so i open command and type cd "C:\Users\USER\Mod Projects\1.7.10\Workspaced\StructureMappingTool\forge-1.7.10-10.13.2.1291-src" Then i Press enter
(as a short cut you can shift right click in the forge folder and there is an option Open Command Window Here, that will have the same effect as the cd command from a fresh command window)
.
Now just type gradlew setupDecompWorkspace & hit enter
.
Once that has finished
gradlew eclipse
If you've done this and it still isn't working check you have JAVA_HOME variable set in environment and check that your JDK matches your JRE
0
gradlew setupDecompWorkspace is one command gradlew eclipse is a different command these should be called on forge src folder (has Gradlew.bat inside it)
Edit - if still having problems, have you updated java recently, there was an update about a month back and update broke eclipse and gradlew, had to update JDK aswell and set system variables to match new version
0
Hmmm the only way i can get my GUI actually on the screen is by calling drawTexturedModalRect(xpos + 220, ypos + 63, 0, 0, xSize, ySize); adjusting it back onto the screen. if its called drawTexturedModalRect(xpos, ypos, 0, 0, xSize, ySize); using the above calculations for xpos and ypos (equivalent of your guiTop and guiLeft) then it draw with my GUI centered in the top left corner of the screen with 75% off the screen only the bottom right corner visible.
I wonder why....
all the same thanks for your help everything is working as desired with the adjusted position values is testing fine
0
mmk.. had a similar problem in the past and it was just a missing comma so thought may have been that
0
Are these issues?
{
"parent": "builtin/generated",
"textures": {
"layer0": "cemod:items/lighter"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ] (no comma like others)
}, (has comma unlike others)
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ] (no comma)
} (if "has comma unlike others" is meant to be there and the one above it not, should there then be a comma here?)
}
}
0
OK, so guiLeft and guiTop is ment to be the top left corner of the Screen??
having sizex set to actual visible pixels of my texture is causing it to be cut in half should i be using full texture pixel width including transparency for this or is there something else that will be causing it
Edit - Solved cut in half issue sizex and sizey are now the number of visible pixels x 2, just a little surprised at how far background had to be shifted to be at center
drawTexturedModalRect(posX + 200, posY + 82, 0, 0, xSize, ySize);
0
Oh that makes sense, explains why the background itself doesn't get weird too just the fields text and buttons (all set with values not math).
Thanks Heaps.
0
I've been working on a couple items and tileEntities that draw gui screens and have found myself needing to set the positions of everything twice once for full screen and once for not otherwise nothing lines up if you change between full and windowed screens.
Though this will only work out if the player has the same windowed size and full screen resolution as me when i wrote the 2 cases otherwise...(see attached screenshot).
Is there a way to set this once and have it align correctly regardless of resolution or do i need to write lots more cases for various resolutions instead of just looking at fullscreen or not fullscreen?
Thanks for any help you guys can provide
0
textures/items/itemtest.png is in main/resources/assets/modtest/ ?? And resolution of png is divisible by 16?
0
No... my blocks show tile."the name i set with setBlockName("blockName")".name
Look at Tutorial 5
how do you think the lang file will work if it says
tile.null.name=Block 1
tile.null.name=Block 2
that's trying to set the key tile.null.name twice not setting 2 different things names, but besides the point try to run a game with more than 1 tile.null.name = crash
0
if its showing up as tile.null.name his block has no name... if he adds a second block without rectifying this it will crash the game on launch.
converting tile.null.name into a display name with lang file doesn't change the name from null