Everything posted by MSandro
-
[1.16.1] Newer mappings file?
Which new system? Where can I see the mapping builds? I started porting to 1.16.2 today, where 20200514-1.16 is still used. It is a bit frustrating not to know where to get new mappings.
-
SaplingGrowTreeEvent not working?
Thank you very much.
-
SaplingGrowTreeEvent not working?
Hi, I try to deny tree growing in specified dimensions. I've found SaplingGrowTreeEvent but I can't get it to work. ... @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainEvents()); MinecraftForge.EVENT_BUS.register(new TerrainEvents()); ... } ... ... public class TerrainEvents { @SubscribeEvent public static void onSapling(SaplingGrowTreeEvent event) { System.out.println("TreeGrowEvent Triggered"); for (String curdim : ConfigManager.DenyInDims) { String[] cs = curdim.split(";"); if (event.getWorld().provider.getDimension() == Integer.valueOf(cs[0])) { if (cs[1].toCharArray()[0] == 't') { event.setResult(Event.Result.DENY); } } } } } Forge Version: forge-1.12.2-14.23.5.2768 What is going wrong? It seems like the event never fires. Thank you for your help.
-
Player Data?? - NBT
Thank you, I know about this forge documentation, but currently I try to folow this tutorial: https://www.planetminecraft.com/blog/forge-tutorial-capability-system/ It seems to be more understandable than the forge documentation.
-
Player Data?? - NBT
Hi, I tried to save some informations in the player.dat files, but I don't understand how. I understand how to do this in MC 1.8 and earlier but since 1.9 this is changed . How can I save this in as player-data like the following: Thank you very much and heave a nice day!
-
[1.10.2] prevent specified Player to craft some items?
Thanks for the tipp.
-
[1.10.2] prevent specified Player to craft some items?
Thank you very much. Yes I know about the item-comparison but later I want to use a config file to check the items, so I must use strings because it is the simpliest way to interact with the config. I will take a look to your tutorial, later.
-
[1.10.2] prevent specified Player to craft some items?
Hi, and heave a nice day! I want to make a mod with many abilities. One part of it is to handle tasks or checkpoints to trigger "ages". So I want to block some crafting recipes until a pleyer reach the needed "level". Remove a recipe server-wide is easy but I don't know how to remove recipes only for players corectly. I tried a very primitiv work-around but it has several problems: @SubscribeEvent public void onCraft(ItemCraftedEvent event) { if (event.crafting.getItem().getRegistryName().toString().contains("minecraft:wooden_sword")) { event.player.inventory.clearMatchingItems(Item.getByNameOrId("minecraft:wooden_sword"), -1, 1, null); } } @SubscribeEvent public void pickUp(EntityItemPickupEvent event) { if (event.getEntity() instanceof EntityPlayer) { if (event.getItem().getEntityItem().getItem().getRegistryName().toString().contains("minecraft:wooden_sword")) { event.setCanceled(true); } } } The first part is removing the output from the players inventory. But the player is loosing the ingridients. The second part destroying the items on pickup, because the player can pres "Q" in the workbench to drop the item. Is it posible to prevent the player from taking the result out of the workbench? The ingridients should stay in the bench. I tried to cancel the event, but then the client crashes. Also is there a event for "event.getEntityPlayer().inventory.inventoryChanged"? I want to drop the item when a player gets a forbidden item. Thank you very much for your help.
-
Compiling issue! NEED HELP PLEASE
Very strange, I tried to put my code for the entities into a separate method. Now it works perfectly
-
Compiling issue! NEED HELP PLEASE
Trank you very much yes I try, but I am very new in Java
-
Compiling issue! NEED HELP PLEASE
https://bitbucket.org/MSandro1998/ms-utilities/src Here is the link to my bitbucket repo.
-
Compiling issue! NEED HELP PLEASE
sorry but I never used Git bevore, but I will check it out soon. You can find a .zip in the atachement of this post. MS Utilities.zip
-
Compiling issue! NEED HELP PLEASE
Does not work too... What am I doing wrong? shelter.java: It only works when I comment out the top block, but I do not understand why!! Edit: No matter which block is commented out, but it must be one. shelter.java
-
Compiling issue! NEED HELP PLEASE
thank you very much for your help, but unfortunately that did not work either.
-
Compiling issue! NEED HELP PLEASE
Thank you, but I already tried that. Don't work I've noticed that something is wrong with my "shelter.jar". if I change: "Entity LeftEntity = EntityList.createEntityByName(ConfigManager.ShelterLeftEntity, world);" to: "EntityLiving LeftEntity = (EntityLiving) EntityList.createEntityByName(ConfigManager.ShelterLeftEntity, world);" The log says: shelter.java
-
Compiling issue! NEED HELP PLEASE
Hi, since today, i can't compile my 1.10.2 mod Here is the log: I already redownloaded the Forge MDK but without success. Since the last release of my Mod MS Utilities I haven't made any changes regarding entities. What can I do??? Thank you!
-
[1.10.2] GUI with item reward / Forge Neworking / Packet System
I don't understand how to use the Forge Package System to do this...
-
[1.10.2] GUI with item reward / Forge Neworking / Packet System
Thank you. Yes, I have already read something about networking and packets, but I do not really understand it.
-
[1.10.2] GUI with item reward / Forge Neworking / Packet System
Hi, I am new in this forum. I am working on a GUI with some buttons. When a player click on a button, I want to give the player some items. But how can I use the forge Packet System to do this?? I do not understand this. Thank you.
IPS spam blocked by CleanTalk.