Jump to content

Kristopher_RAS

Members
  • Posts

    34
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Kristopher_RAS's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So where can I find my advancement ? well found it: return serverPlayer.getAdvancements().getProgress(serv.getAdvancementManager().getAdvancement(Registry.GetRL(AdvName))).isDone();
  2. Last small things, I still to use: Minecraft.getInstance().player.connection.getAdvancementManager().getAdvancementList().getAdvancement(Registry.GetRL(AdvName)) to get the advancement, if I'm Serveur side how do I get a ClientPlayerEnity (where is the connection and the advancementManager) ??
  3. I've followed this tutorial: And now it work properly this "Research" Function is called on server side (I've tested it with isRemote), Thank you a lot guys. If you want me to post my codes for you to check tell me.
  4. https://mcforge.readthedocs.io/en/1.15.x/networking/simpleimpl/ Did not really helped me, do you have a proper tutorial on Minecraft networking ??
  5. OK, so I found this https://mcforge.readthedocs.io/en/1.15.x/networking/simpleimpl/, to learn how to send packet but I'm not sure if EntityPlayerMP is ClientPlayerEnity or ServeurPlayerEntity (I guess this is he first but i want to be sure). My bad found it: ServeurPlayerEntity
  6. Well basically the event is called when the player press a button in the interface. But the screen, handle the button events only on client side (I think), so I don't know how to do it on server side.
  7. So I tried using player.world.getServer() but it crashed. I've made some test and player.world.getServer() return null. Note: the player came from the container for the interface.
  8. Hello everyone, I'm sorry if I asking a lot of question recently. But I've noticed that when I place a block I created his assigned tile entity is created twice (more exactly two of them are created). Same when I open the block interface two container are created. BUT only one screen is created. So my question is: "Is that normal ?? And how do I synchronize them" Note: I've tried to figured it out and I've noticed the override function createTileEntity of the block is called twice (on client side), so this is why I have a doubt about if it's a bug or not. Thanks.
  9. I have a research table and when you do a specific researches it unlock some advancements but I have to check first if the previous achievement has been granted or not.
  10. This is the only way I've found. But if you have a better way don't hesitate to tell.
  11. After hours of research in the forge and minecraft codes i found it: Minecraft.getInstance().getIntegratedServer().getPlayerList().getPlayerAdvancements(Minecraft.getInstance().getIntegratedServer().getPlayerList().getPlayers().get(0)).grantCriterion(Minecraft.getInstance().player.connection.getAdvancementManager().getAdvancementList().getAdvancement(Registry.GetRL("copper_cable")), "unlock"); Minecraft.getInstance().getIntegratedServer().getPlayerList().getPlayerAdvancements(Minecraft.getInstance().getIntegratedServer().getPlayerList().getPlayers().get(0)).getProgress(Minecraft.getInstance().player.connection.getAdvancementManager().getAdvancementList().getAdvancement(Registry.GetRL("copper_cable"))).getPercent();
  12. Hello everyone, I try access to the player advancements to - first: check if specifics advancements has been granted - second: Grant advancements. I found several leads like: Minecraft.getInstance().player.connection.getAdvancementManager().setSelectedTab(Minecraft.getInstance().player.connection.getAdvancementManager().getAdvancementList().getAdvancement(Registry.GetRL("copper_cable")), true); also I found a class called: PlayerAdvancements (With a grant and revoke function) but I don't know where to find it in the player class or how to instance a new one (the second arguments is a file and I don't know what file it has to be). (https://forge.galaxy.nctu.me/forge/javadoc/14.23.5.2838-stable_39/net/minecraft/advancements/playeradvancements#getProgress-net.minecraft.advancements.Advancement-) Thanks. Note: it's possible to grant achievement through commands but I prefer do it by code.
  13. Hi, I try to create a team, here is the actual code: World.getScoreboard().createTeam("blue"); World.getScoreboard().getTeam("blue").setDisplayName(new StringTextComponent("Blue")); World.getScoreboard().getTeam("blue").setColor(TextFormatting.BLUE); World.getScoreboard().getTeam("blue").setNameTagVisibility(Visible.HIDE_FOR_OTHER_TEAMS); When I'm testing it the team is well created but when I try the command : /team join (minecraft offer the "blue" option to me) Dev : it says "Unknown team 'blue' " Same when ask: /team list: it says: "there are no teams" Note: - the team is created by right click on a block in the mod. - Each time I reload the map the team disappear. RESOLVED BY IT SELF.
  14. Hey, Thank you for your answer: it was func_225533_a_ I was stupid to do not think about it I usually check them when I can't find a function. Anyways I gonna check for mapping. Thanks a lot.
  15. Thanks for your help
×
×
  • Create New...

Important Information

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