Jump to content

Recommended Posts

Posted

good nights

 

im updating mi updating of mi mod from 1.10 to 1.11 but

for some reasons any of mi textures works and i fear something big change in the way you set textures for items and blocks probably entities too

 

the thing is this, i have a generic class to create items

https://gist.github.com/anonymous/3c7dca0bac0e0b4f702a82abae4e761d

 

so i have mi items.init where i just set the names

https://gist.github.com/anonymous/69391facf41c9abc91fcf21542579e4c

 

##

notice i use names whit mixed lower and upper case

 

then i have mi textures  class

https://gist.github.com/anonymous/7658649aadc175923beb1e65a45e5504

 

always mixed case names

 

when i load the game and see the output i get this curiosity

all the name and route is lowercased

 

Caused by: java.io.FileNotFoundException: modmercenario:models/item/materiales/materialesredstonecompresa.json

 

but item and texture are registered whit [lower|uppercased] names

public static Item materialesRedstoneCompresa;
materialesRedstoneCompresa = new modmercenario.items.materiales.materialGenerico("materialesRedstoneCompresa");
ModelLoader.setCustomModelResourceLocation(MMMateriales.materialesRedstoneCompresa,0 , 
new ModelResourceLocation("modmercenario:materiales/materialesRedstoneCompresa", "inventory"));

 

####

soo i set everything to lowercase names, json and png everything and bam solved

is this a new rule everything must be set lowercase to work or wtf bug ???

 

is mi way of setting textures still valid??

 

###

and there is some more questions, this methods are market in mi code as error and i asked to remove @overrides so they are anymore in the main block class, they wass remove and  now is different the way to make a block do something on right click ??

 

*public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) {

 

*public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ,int meta, EntityLivingBase placer)

 

*@Override

  @SideOnly(Side.CLIENT)

public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) {

list.add(new ItemStack(itemIn, 1, 0 ));

}

 

neither

*public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn) {

 

 

can some captain point-me in account whit the resents changes or the locations of the latest  update guide tutorial.

 

very tankful mercenarydog

 

 

 

Posted

Mojang has enforced all lowercase file names.

 

The methods signature has changed these are the new ones.

public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){}

public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack){}

public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list){}

public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor){}

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.

Posted

Why can't people read their fucking errors?

 

file not found: "materialesredstonecompresa.json"

file that exists: "materialesRedstoneCompresa.json"

 

THESE STRINGS DON'T MATCH.

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

but trolling a side

is good to know im remaking the mod and only have like 30 items and 10 blocks imagine you have all that items already made, and then they push this kind of rule and you have to redo change the name of everything to lowercase, and make it in windows

 

im curious to know if they already fix that annoying feature whit the ReequipAnimation

 

    /**
     * Determine if the player switching between these two item stacks
     * @param oldStack The old stack that was equipped
     * @param newStack The new stack
     * @param slotChanged If the current equipped slot was changed,
     *                    Vanilla does not play the animation if you switch between two
     *                    slots that hold the exact same item.
     * @return True to play the item change animation
     */
    public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged)
    {
        return !oldStack.equals(newStack); //!ItemStack.areItemStacksEqual(oldStack, newStack);
    }

 

this shit cause me to quit moding the last time

im still far from the point i got enough code to test it

Posted

but trolling a side

is good to know im remaking the mod and only have like 30 items and 10 blocks imagine you have all that items already made, and then they push this kind of rule and you have to redo change the name of everything to lowercase, and make it in windows

 

30 items and 10 blocks. So many. Very changes. Much work. Wow.

 

I just finished up updating a 1.7 mod to 1.10.

70 items and 30 blocks, plus or minus.

And that's ignoring the fact that I had to MAKE the json files (about 200) and redo 40-odd textures.

 

And that's STILL not including the custom state mapper work I had to do OR the IBakedModel shenanigans for a 'liquid' model.

 

I, at least, don't need to come to the forums to diagnose a FileNotFound or NullPointer.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • That seems to have fixed it, thank you!
    • I am having some issues starting an RLCraft server on a minimal install of Debian 12. I have Java installed and I'm able to start the vanilla Minecraft server jar no problem and people can join and play without any issues, as soon as I try to create a new directory with the Forge jar the initial install with the INSTALLER jar works when I use the java command with the --installServer flag, but as soon as I try to start the server using the forge jar that is NOT labelled with installer I get the following error: A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.base/java.lang.reflect.Method.invoke(Method.java:569)         at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)         at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34) Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')         at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)         at net.minecraft.launchwrapper.Launch.main(Launch.java:28)         ... 6 more   I have tried using newer versions of Java directly from Oracle as well. Has anybody been successful in starting and running a RLCraft server from the terminal on a Linux machine? I cannot figure out why it doesn't want to work but the vanilla jar works without issue. Thank you in advance!
    • This is my latest attempt :  public class ManaScreen extends Screen { Mana mana = new Mana(); boolean removeManaBar = false; ResourceLocation manaBar = ResourceLocation.fromNamespaceAndPath(RSGArmoury.MOD_ID, "/textures/block/spawnable_arena_wall.png"); public ManaScreen() { super(Component.literal("Mana")); } @Override protected void init() { super.init(); Minecraft.getInstance().setScreen(this); } @Override public boolean isPauseScreen() { return false; } @Override public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick) { pGuiGraphics.blit(manaBar, 10, -10, 0, 0, mana.getMana(), 10, mana.getMana(), 10); if (removeManaBar) { this.onClose(); return; } super.render(pGuiGraphics, pMouseX, pMouseY, pPartialTick); } public void addManaBar() { removeManaBar = false; Minecraft.getInstance().setScreen(new ManaScreen()); } public boolean removeManaBar() { return removeManaBar = true; } }
    • I tried a few different things that all didnt work. Right now I have nothing but what I had that seemed most likely to work was just a guiOverlay.blit(x, y, z, vx, vy, getMana()). I dont remember the exact code but it was somthing along those lines. It was in a new class extending screen I believe.
  • Topics

×
×
  • Create New...

Important Information

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