Jump to content

New Texture Directory For Minecraft Forge 1.6.1


XxxXEclipse7XxxX

Recommended Posts

Why do people call it a pahimar setup? I've been using it since long before he showed it to everyone ><

 

Because he showed it to everyone.

Oh, and I tried to follow his tutorial to set myself up like that and I couldn't get it to work, so I said, "the hell with it, hard drive space is cheap" and just move things around as I need to.

 

Then i don't know, if you read the readme that dinnerbone put in the assets folder inside of MCP it says that anything placed there will be deleted on start-up.

 

I read the readme.  It's entirely unhelpful.  Because all it says (and you repeated it) is "don't put things here."  It does NOT say where they should go!

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

  • Replies 90
  • Created
  • Last Reply

Top Posters In This Topic

I've been trying to update my NBTEdit mod, which has a couple of GUI textures.

 

I first tried "assets/nbtedit/textures/gui/..." and a similar ResourceLocator,

 

 

public static final ResourceLocation TEXTURE = new ResourceLocation("nbtedit", "textures/gui/widgets.png");

 

That of course didn't work, but, if I move my textures to "assets/minecraft/nbtedit/textures/gui/..." and use this code, it works.

 

public static final ResourceLocation TEXTURE = new ResourceLocation("nbtedit/textures/gui/widgets.png");

 

Now, I dug into the problem, and here are my findings. SimpleReloadableResourceManager attempts to load the texture with a call to func_110536_a(ResourceLocation), which then uses the first string (normally "minecraft", attempted to set for my mod "nbtedit") to locate a ResourceManager from its ResourceManager map. Of course, nothing is mapped to "nbtedit". The reason one is mapped to "minecraft" is because in a call to SimpleReloadableResourceManager.func_110545_a(ResourcePack), the default resource pack is loaded, which contains an immutable set of strings to map with a FallbackResourceManager. The set only contains "minecraft", and when it sees "nbtedit" later, it crashes instead of creating a new FallbackResourceManager. I believe we need to wait for a proper Forge implementation of "AbstractResourcePack" or an edit of SimpleReloadableResourceManager.

Link to comment
Share on other sites

Why do people call it a pahimar setup? I've been using it since long before he showed it to everyone ><

 

Then i don't know, if you read the readme that dinnerbone put in the assets folder inside of MCP it says that anything placed there will be deleted on start-up.

i tryed to use your version but i get this error insted

2013-07-02 19:28:09 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/items/MISSING_ICON_ITEM_7258_Steel-Ingot.png

Link to comment
Share on other sites

As for locations, here is what's working for me at the moment:

 

1) Within Eclipse/Forge/MCP:

- Keep setup the same: {modid}\textures\{items/blocks}\name.png

 

2) After recompiling & obfuscation, ready for live play:

\assets\{modid}\textures\items\name.png

Unfortunately, blocks does not seem to be playing by the same rule for me *despite* the following:

 

3) After opening the 1.6.1 jar in .minecraft/versions/, this is what I'm finding:

\assets\{modid}\textures\blocks\

\assets\{modid}\textures\items\

\assets\{modid}\textures\entities\{mobtype}\name.png

GUI, paintings, items, misc, and all that is in that \textures\(subfolder)\ as well.

 

I'm wondering if the blocks' textures need to be coded differently, even though there's no apparent errors in Eclipse for my code.

Link to comment
Share on other sites

As for locations, here is what's working for me at the moment:

 

1) Within Eclipse/Forge/MCP:

- Keep setup the same: {modid}/textures/{items/blocks}/name.png

 

And where does this folder go?

 

2) After recompiling & obfuscation, ready for live play:

- Items - assets/{modid}/{textures}/items/name.png

Unfortunately, blocks does not seem to be playing by the same rule.  assets/{modid}/{textures}/tiles/name.png does *not* work for me.

 

/tiles?  don't you mean /blocks?

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

And where does this folder go?

 

My apologies.  Full file paths, for my setup; first set is with the .class files after recompilation, second set is with the .java files before recompilation:

C:\Files\forge\mcp\eclipse\Minecraft\bin\mods\minehack\textures\items\name.png

C:\Files\forge\mcp\eclipse\Minecraft\bin\mods\minehack\textures\blocks\name.png

 

C:\Files\forge\mcp\src\minecraft\mods\minehack\textures\items\name.png

C:\Files\forge\mcp\src\minecraft\mods\minehack\textures\blocks\name.png

 

/tiles?  don't you mean /blocks?

 

I mean both. :)  It was a random idea; on mouseover in live, the blocks have 'tile.Antigonite.name' for instance, so I figured it was worth checking to see if might have been changed to \tiles\ instead of \blocks\.  Not so, sadly.

Link to comment
Share on other sites

mcp/eclipse/Minecraft/bin/assets/minecraft/ seems to be working if you're using ResourceLocation.

 

Ie...

 

new ResourceLocation("infection/textures/entity/walker.png");

 

=

 

mcp/eclipse/Minecraft/bin/assets/minecraft/infection/textures/entity/walker.png

 

If you want something that works for the time being without going in and editing the jar.

Link to comment
Share on other sites

I have had the same problem as others and have found the solution.

 

Assets are loaded from the icon registry at a different time than they used to be. You must register your icons during the PRE INIT not during the INIT. Otherwise they will not be in the icon registry when the assets are loaded.

 

Hope that helps.  ;)

 

EDIT: Just to confirm, the directory is the same as before but "assets" instead of "mods".

Link to comment
Share on other sites

Can you still use that in forge build 758, as they made this change...

 

"Resource packs, part two. FML mods are now resource packs. Vanilla will scan anything under 'assets' and turn it into a resource prefix. Use resourcelocations to look stuff up."

 

Edit: Never mind, that does work.

Link to comment
Share on other sites

You must register your icons during the PRE INIT not during the INIT.

 

And how does one do that?

Forge calls registerIcons, not [my main mod file].

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

ResourcePacks *should* be refreashed after all mods are loaded.

Make sure you're using the latest version of Forge.

the proper place to pt your asses is in: /mcp/src/minecraft/assets/{modname}

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Lex, I tried that but it wouldn't work. I tried outside of a /mcp/src/minecraft/assets/{modname}/textures and inside. Neither work. Where do I put the textures?

 

EDIT: I finally got to a live version of files.minecraftforge.net. I'm going to update and see what happens!

 

EDIT: Still didn't work.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

ResourcePacks *should* be refreashed after all mods are loaded.

Make sure you're using the latest version of Forge.

the proper place to pt your asses is in: /mcp/src/minecraft/assets/{modname}

 

It is not doing that in the latest version on the file server, you have to put all LanguageRegistry calls in preInit for the names and textures to be found correctly.  It might need more, my init method is basically LanguageRegistry, GameRegistry, OreDictionary, and instantiations, so I just grabbed most of it and moved it over.  I also added in pack.mcmeta file under assets/modname and almost all of my textures loaded with no other changes to the code.  The only one that didn't work after that was my hacked together test block, and that was because I used setUnlocalizedName as the texture reference.  My gui textures aren't loading though, so that's next on my list of stuff to fix tomorrow, probably a reference issue.  I have it updated on my Github (https://github.com/Malorolam/Carbonization) so there is a more complex example to look at for block and item textures.

Link to comment
Share on other sites

I'm blaming Mojang for some of this nonsense.

 

If you take a look in FolderResourcePack.java

if (!s.equals(s.toLowerCase()))
{
    this.func_110594_c(s);
}

 

which roughly translates as:

if mod name contains upper case letters, then throw an error and refuse to do anything with it.

 

Anyone happen to know which string it uses in this function, eg is it Mod.modid, Mod.name or something else ?

Link to comment
Share on other sites

I'm blaming Mojang for some of this nonsense.

 

If you take a look in FolderResourcePack.java

if (!s.equals(s.toLowerCase()))
{
    this.func_110594_c(s);
}

 

which roughly translates as:

if mod name contains upper case letters, then throw an error and refuse to do anything with it.

 

Anyone happen to know which string it uses in this function, eg is it Mod.modid, Mod.name or something else ?

 

String s is the return from a function that takes in two files, one of which appears to be the main directory to the assets folder, the other appears to be the mod specific file locations, i.e. the <modname>/textures/blah part, all of which should normally return all lowercase.

 

From what I see, if it throws the error it's because there is actually an error, and the basic Java file structure stuff broke somehow.

Link to comment
Share on other sites

ResourcePacks *should* be refreashed after all mods are loaded.

Make sure you're using the latest version of Forge.

the proper place to pt your asses is in: /mcp/src/minecraft/assets/{modname}

 

It is not doing that in the latest version on the file server, you have to put all LanguageRegistry calls in preInit for the names and textures to be found correctly.  It might need more, my init method is basically LanguageRegistry, GameRegistry, OreDictionary, and instantiations, so I just grabbed most of it and moved it over.  I also added in pack.mcmeta file under assets/modname and almost all of my textures loaded with no other changes to the code.  The only one that didn't work after that was my hacked together test block, and that was because I used setUnlocalizedName as the texture reference.  My gui textures aren't loading though, so that's next on my list of stuff to fix tomorrow, probably a reference issue.  I have it updated on my Github (https://github.com/Malorolam/Carbonization) so there is a more complex example to look at for block and item textures.

I would like to know what a pack.mcmeta file is and what it should contain

Don't tell me to learn the basics of java, I already know.

Link to comment
Share on other sites

I would like to know what a pack.mcmeta file is and what it should contain

 

Apparently this:

 

{
"pack": 1,
"description": "Forge Mod Defaults"
}
}

 

Not that adding it to my project made any difference what so ever.

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

 

Which is, sadly, no more helpful than this thread.

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

it has worked for alot of people! :P if you actually followed it correctly!

 

Please sir, inform me as to what I'm doing wrong.

https://dl.dropboxusercontent.com/u/7950499/src.zip

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

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.