-
Posts
143 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Oscarita25
-
Custom Json rendering missing Texture :L is showing up
Oscarita25 replied to Oscarita25's topic in Modder Support
you are looking wrong .. they are outside the skins folder the skins folder isn't even opened -
Custom Json rendering missing Texture :L is showing up
Oscarita25 replied to Oscarita25's topic in Modder Support
-
Custom Json rendering missing Texture :L is showing up
Oscarita25 replied to Oscarita25's topic in Modder Support
caugh ... caugh ..... oops.. forgot this in my whole code: @SubscribeEvent public static void onModelBakeEvent(final ModelBakeEvent event) { final IRegistry<ModelResourceLocation, IBakedModel> registry = event.getModelRegistry(); injectModels(registry); } thanks @diesieben07 edit: wierd.. it actually changed nothing ? -
Custom Json rendering missing Texture :L is showing up
Oscarita25 replied to Oscarita25's topic in Modder Support
i am not sure how would i do that? -
Custom Json rendering missing Texture :L is showing up
Oscarita25 replied to Oscarita25's topic in Modder Support
those are custom classes that i got from some posts from persons who tried this wait i will send 'em: edit: also cadiboo helped me greatly with this := -
i can imagine that it is some stupid error of mine like the last few posts from me ... but i guess i will ask anyways: basicly what i am trying to do is rendering a json file on the player .. which works perfectly fine but i get the missing texture instead of the ones i made... (and i dont even get any kind of error .. like a texture loading error or something like that) the class i overwrite the normal player render with: and my json: edit: btw this is how it looks like:
-
okay i am 100% already sure this is a ONLY json error so i am not sure if the modder support is the right thing to ask this but: (tested it with another model which works just fine) when i try to load my json with my custom renderer i get the error "Invalid rotation 60.0 found, only -45/-22.5/0/22.5/45 allowed" is it because i am using 2 axis rotation instead of 1 axis rotation? here is the json: Edit: its not because of 2 axis rotation
-
ironically i got back to just doing everything 1 capability for each ?♂️ worked out fine actually...
-
nope its just exactly as the @diesieben07 said. for the unecissary package "overload" its just trying around ... if you read my previous posts you will propably notice that i had absolutly no clue how packages work ... so i am gotta fix that now. also thanks for all the pointers of what is complete nonsense of what i wrote there.
-
i am not sure if i am misunderstanding this ... but you mean i have to save it somewhere else ... not just with capablities?
-
also i did overlook this one ... i am only trying that it doesn't follow the player from world to world, I want to change the value when he has the default value, it is a capablitly attached to the player.
-
@diesieben07 here is the full code: https://github.com/Oscarita25/QuickRepo this is in my eventhandler: @SubscribeEvent public void onPlayerLoggedIn(PlayerLoggedInEvent event) { EntityPlayer player = event.player; //Sycronizing Capabilities ILevel level = player.getCapability(LevelProvider.LEVEL_CAP, null); IExp exp = player.getCapability(ExpProvider.EXP_CAP, null); INExp nexp = player.getCapability(NExpProvider.NEXP_CAP, null); IQuirk iquirk = player.getCapability(QuirkProvider.QUIRK_CAP, null); BNHA.NETWORK.sendTo(new MessageRequestLEVEL(), (EntityPlayerMP) player); BNHA.NETWORK.sendTo(new MessageRequestEXP(), (EntityPlayerMP) player); BNHA.NETWORK.sendTo(new MessageRequestNEXP(), (EntityPlayerMP) player); BNHA.NETWORK.sendTo(new MessageRequestQuirk(),(EntityPlayerMP) player); BNHA.NETWORK.sendToServer(new MessageLEVEL()); BNHA.NETWORK.sendToServer(new MessageEXP()); BNHA.NETWORK.sendToServer(new MessageNEXP()); BNHA.NETWORK.sendToServer(new MessageQuirk()); player.sendMessage(new TextComponentString("Your level is: " + level.getlvl())); player.sendMessage(new TextComponentString("Your exp is: " + exp.getexp())); player.sendMessage(new TextComponentString("Exp needed for the next level: " + (nexp.getnexp() - exp.getexp()))); } @SubscribeEvent public void onPlayerClone(PlayerEvent.Clone event) { //copy's capabilities EntityPlayer player = event.getEntityPlayer(); ILevel level = player.getCapability(LevelProvider.LEVEL_CAP, null); ILevel oldLevel = event.getOriginal().getCapability(LevelProvider.LEVEL_CAP, null); IExp exp = player.getCapability(ExpProvider.EXP_CAP, null); IExp oldExp = event.getOriginal().getCapability(ExpProvider.EXP_CAP, null); INExp nexp = player.getCapability(NExpProvider.NEXP_CAP, null); INExp oldNExp = event.getOriginal().getCapability(NExpProvider.NEXP_CAP, null); IQuirk cap = player.getCapability(QuirkProvider.QUIRK_CAP, null); IQuirk capold = event.getOriginal().getCapability(QuirkProvider.QUIRK_CAP, null); if(event.isWasDeath()) { cap.setMaxCooldown(capold.getMaxCooldown()); cap.setMaxActivatedTime(capold.getMaxActivatedTime()); cap.setCooldown(capold.getCooldown()); cap.setAct(capold.getAct()); cap.setActivated(capold.getActivated()); cap.setAvailable(capold.getAvailable()); cap.setQuirkID(capold.getQuirkID()); level.setlvl(oldLevel.getlvl()); exp.setexp(oldExp.getexp()); nexp.setnexp(oldNExp.getnexp()); BNHA.NETWORK.sendToServer(new MessageLEVEL()); BNHA.NETWORK.sendToServer(new MessageEXP()); BNHA.NETWORK.sendToServer(new MessageNEXP()); BNHA.NETWORK.sendToServer(new MessageQuirk()); BNHA.NETWORK.sendTo(new MessageRequestLEVEL(), (EntityPlayerMP) player); BNHA.NETWORK.sendTo(new MessageRequestEXP(), (EntityPlayerMP) player); BNHA.NETWORK.sendTo(new MessageRequestNEXP(), (EntityPlayerMP) player); BNHA.NETWORK.sendTo(new MessageRequestQuirk(),(EntityPlayerMP) player); } } @SubscribeEvent public void onPlayerTick(LivingUpdateEvent event) { //checking for level ups if (event.getEntity() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.getEntity(); IExp exp = player.getCapability(ExpProvider.EXP_CAP, null); INExp nexp = player.getCapability(NExpProvider.NEXP_CAP, null); ILevel level = player.getCapability(LevelProvider.LEVEL_CAP, null); IQuirk iquirk = player.getCapability(QuirkProvider.QUIRK_CAP, null); if (!player.world.isRemote) { //Random quirk choose Reference.RandomQuirkChoose(iquirk, player); if(exp.getexp() >= nexp.getnexp()) { level.setlvl(level.getlvl() + 1); BNHA.NETWORK.sendToServer(new MessageLEVEL()); nexp.setnexp(nexp.getnexp()*(level.getlvl() ^ 1)); BNHA.NETWORK.sendToServer(new MessageNEXP()); exp.setexp(0); BNHA.NETWORK.sendToServer(new MessageEXP()); player.sendMessage(new TextComponentString("You reached Level " + level.getlvl())); } }else return; } } in the on LivingUpdateEvent i put "Reference.RandomQuirkChoose(iquirk, player);" in my Reference class it looks like this (dont know if its relevant) public static void RandomQuirkChoose(IQuirk iquirk,EntityPlayer player) { if(iquirk.getQuirkID() == Reference.none) { int random = Reference.RandomIntChoose(); System.out.println(random + "Quirk NONE"); iquirk.setQuirkID(random); BNHA.NETWORK.sendToServer(new MessageQuirk()); if(iquirk.getQuirkID() == Reference.quirkless) { System.out.println(random + "Quirk QUIRKLESS"); iquirk.setName("Quirkless"); BNHA.NETWORK.sendToServer(new MessageQuirk()); }else if(iquirk.getQuirkID() == Reference.explosionquirk) { System.out.println(random + "Quirk EXPLOSION"); iquirk.setName("Explosion Quirk"); BNHA.NETWORK.sendToServer(new MessageQuirk()); } if(iquirk.getQuirkID() == Reference.quirkless) { player.sendMessage(new TextComponentString("You are " + iquirk.getName())); }else { player.sendMessage(new TextComponentString("Your Quirk is: " + iquirk.getName())); } } }
-
ok, but First i am installing a OS ... (made a partition of my harddrive took long enough)
-
i know that they are not made to work like this ... but i my code basicly does it.. and its not even wanted that it does this ...
-
okay sorry for the late reply, (had some school stuff to do) basicly i only want to save those values on the player but they save on the account and i dont know why till now my code is a BIG mess so its also very difficult to find the problem i set it up like this: in my OnPlayerJoin event (0 is the default value) a random "qurik" should be choosen (an ID between 1 and 2 till now) when it is 0... but the ID is NOT 0 when i joined a world before i join another if i restart the game the value is 0 again... If a Github Repository is prefered i would provide one (it will take some time because i am installing now a second OS on my pc)
-
Basicly just as the title describes i want to save multiple values in 1 Capability. i know i can do this with something like this in the Storage class: @Override public NBTBase writeNBT(Capability<IQuirk> capability, IQuirk instance, EnumFacing side) { NBTTagCompound tag = new NBTTagCompound(); tag.setString("name", instance.getName()); tag.setBoolean("activated", instance.getActivated()); tag.setBoolean("available",instance.getAvailable()); //Cooldown tag.setInteger("maxCooldown", instance.getMaxCooldown()); tag.setInteger("cooldown", instance.getCooldown()); //Activation Time tag.setInteger("maxAct", instance.getMaxActivatedTime()); tag.setInteger("act", instance.getAct()); //Quirk ID tag.setInteger("quirkid", instance.getQuirkID()); return tag; } @Override public void readNBT(Capability<IQuirk> capability, IQuirk instance, EnumFacing side, NBTBase nbt) { NBTTagCompound tag = (NBTTagCompound) nbt; tag.getBoolean("activated"); tag.getBoolean("aviable"); //Cooldown tag.getInteger("maxCooldown"); tag.getInteger("cooldown"); //Activation Time tag.getInteger("maxAct"); tag.getInteger("act"); //Quirk ID tag.getInteger("quirkid"); } But i ran into the problem with this that it saves to the Player... not on the world. (as Example: i join world A with "xp" capablity set to 12 and log out join world B and still have the same amount!) i AM using packets... so i dont know what i am doing wrong here.. thanks in advance
-
okay
-
okay.. i think this is also my last question: how would i "show" the model / bind the model on the player in the RenderPlayerEvent? (and thanks for helping at always )
-
just meant that the stuff thats rendered is also visible for other players
-
▫️ just bringing this up so someone see's it
-
Well as the Title already says .. i want to render Models on the player .. and i have no idea how to start .. ◾ i am basicly trying to render the Model class on the modelbiped(of the player) ◾ and it should be not visible only client side .. aka. other players can see it thanks for helping
-
yeah i do ... okay but my problem what i have would be: that this doesn't work :I .. and i have to save the Level/Exp .. in a NBT .. .. so it wont get deleted when you leave the world/server.. right?
-
and i also just noticed.. this wont work on the server right? .. i mean i have no step where i am syncronizing the exp/level with the server :I .. *edited* eh .. "no step" yea.. "ServerTickEvent" .... overreading the important things ?
-
*i am still pretty confused about this* ?