Jump to content

ZeProfCoding

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    France

ZeProfCoding's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Wouldn't it be better to make a plugin that handles this with Redis cache and a MariaDB database?
  2. I would also like to store others things like money, quests in progress, unlocked hats, player rank, etc... Is it a good idea to use capabilities for all of that with a large player base? Wouldn't this get laggy?
  3. Hello! I'm actually doing a Sorting Hat like in Harry Potter, it puts you in a random house. I want to store his house as a string on the player object. What is the best way to do this?
  4. I resolved it like this : @Override public boolean onCast(PlayerEntity playerIn, int playerPower) { playerIn.rotationYaw = 180F; playerIn.rotationPitch = 0; playerIn.setPositionAndUpdate(playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ()); return true; }
  5. Hello! I'm actually doing the Harry Potter Spells in Minecraft and I want to reproduce the Four Point Spell. The concept is easy: it points the player to the north. Here is what I tried : @Override public boolean onCast(PlayerEntity playerIn, int playerPower) { playerIn.setLocationAndAngles(playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), 180F, 0); playerIn.setHeadRotation(180F, 0); playerIn.rotationYaw = 180F; playerIn.rotationPitch = 0; return true; } Thank you for your help.
  6. Hello, i'm trying to change the game icon. Here is my actual code : public HogwartsMod() { // Register the setup method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); // Register the doClientStuff method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); } private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings); try { InputStream inputstream = Minecraft.getInstance().getResourceManager().getResource(new ResourceLocation(HogwartsMod.MODID, "icons/icon_16x16.png")).getInputStream(); InputStream inputstream1 = Minecraft.getInstance().getResourceManager().getResource(new ResourceLocation(HogwartsMod.MODID, "icons/icon_32x32.png")).getInputStream(); Minecraft.getInstance().getMainWindow().setWindowIcon(inputstream, inputstream1); } catch (IOException ioexception) { LOGGER.error("Couldn't set icon", ioexception); } } The two image files : https://imgur.com/a/Sm0NAQF What it's rendered like in the task bar: Thank you for your help.
  7. Hello! I'm actually doing a Sorting Hat like in Harry Potter, it puts you in a random house. I want to store his house as a string on the player object. What is the best way to do this?
×
×
  • Create New...

Important Information

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