Jump to content

ciroreed

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by ciroreed

  1. Hello im using the latest version of forge and im trying to give an effect to the player that sort of emulates elytra flight. Kind of gliding. Is there a way to do this? Im pretty new at modding but I kinda think it would be something like subscribing to onPlayerEntityUpdate, then checking if that player has that effect, next reduce falling speed? ... Thanks!
  2. sorry but the word "tick" isn't found in the whole document. No clues for delaying events or something.
  3. world.spawnEntity(new Entity() { @Override onUpdate() { } }); i don't have any idea what im doing xd
  4. with my "threadish" approach the explosion occurs, damages blocks, etc, but when harms any entity the game crashes. Im not pushing this solution forward, it just seems more obvious to me bcoz im a rockie at modding
  5. sounds good but i don't know how to do it. Is there a way to subscribe to ticks, so i can count
  6. I don't have any idea. Im pretty new at modding. I just learned how to post events. I understand that all operations should be performed on the main thread but I don't know where I can "count ticks"
  7. Im able to make it work unless the explosion interacts with an entity lmao: as diesieben said: by running stuff outside the main thread I get concurrentModificationException. Now, rather than performing the action at the moment the runnable triggered im doing this: Timeout.run(() -> MinecraftForge.EVENT_BUS.post(new DelayedSpellEvent(player, world, spell, vec)), 1000); So im emiting an event from outside the main thread and it works!!! unless the explosion harms any entity XD Yup, casting and then, after a second, an explosion raises where u just casted
  8. how do i do that? is there any meaningful guide thanks
  9. static void setTimeout(Runnable runnable, int delay){ new Thread(() -> { try { Thread.sleep(delay); runnable.run(); } catch (Exception e){ System.err.println(e); } }).start(); } @Override protected void castSpell(World world, EntityPlayer player, BasicWand wand) { double x = player.posX; double y = player.posY; double z = player.posZ; setTimeout(() -> world.newExplosion(player, x, y, z, 10.0F, true, true), 1000); } by executing this piece of code I get an error:java.util.ConcurrentModificationException: null Im just looking for triggering an explosion where the player was standing a second ago. thanks
  10. thanks for the reply I need to render specific item variant having item's internal data, as you said NBT. I guess I found the answer here: https://github.com/TheGreyGhost/MinecraftByExample/blob/1-12-2-final/src/main/java/minecraftbyexample/mbe11_item_variants/ItemVariants.java great resource tbh
  11. I have a vague knowledge regarding item rendering. I need to render an item by layers. 0 - basic layer 1 - basic + one layer 2 - basic + one + layers and so forth. I recall metadata was meant to do so, im I right? is there any resources regarding how metadata is used? Thanks!
  12. Okay, thanks! im not asking about 1.12 specifically. My questions are mostly about forge concepts. I have both documentations opened and I can make my way. 1.16 answers will help me anyways
  13. I ask here expecting to receive some advice, like the name of the interfaces involved on this process. Thanks. DyeUtils? or rather.. EnumDyeColor?
  14. context: It is posible to create new color instances in order to dye armor? So im looking for creating new dyes (harder to achieve) which cannot be emulated by mixing vanilla dyes. Like exclusive ones. And give some effects for the armor. This is the concept: - u get a drop from a mob or elsewhere - that item is a dye, that can dye armor (and whool?) - that color applies a color code which isn't found here https://minecraft.gamepedia.com/File:DyeGraph2.png - that dyed leather armor has several effects which apply when the wearer gets attacked (by checking if dyed color matches)
  15. My use case is the following. In order to use an item I have to check that the player is wearing a (dyed) blue leather armor ok, this can be closed. Just to share it: @Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand){ if(world.isRemote) return super.onItemRightClick(world, player, hand); ItemStack itemStackBoots = player.getItemStackFromSlot(EntityEquipmentSlot.FEET); if(itemStackBoots.isEmpty()) return super.onItemRightClick(world, player, hand); int colorValue = itemStackBoots.getTagCompound().getCompoundTag("display").getInteger("color"); for (EnumDyeColor color : EnumDyeColor.values()) { if(colorValue == color.getColorValue()) { out.println(color.getName()); } } return super.onItemRightClick(world, player, hand); }
  16. do you know how color codes work? I have blue boots and it has a nbt tag display.color = 3949738. Boots are blue. How do i get that in runtime? is there any class or enum or dyes.getColorFromCode(3949738) // blue
  17. Given a ItemStack from player.getItemStackFromSlot(EntityEquipmentSlot.FEET); or any slot how to test for a given color, or print the color thanks!
  18. Thanks for the reply. Where I can receive support for 1.12.2 version?
  19. Hello, how to I register a brewing for an existing potion? To give some context I just want to create recipes for this mod https://www.curseforge.com/minecraft/mc-mods/potion-core Im a developer but quite illiterate on java env. I understand that I have to reference potion-core's jar in my code in order to tie the recipes and potions. I was looking on the internet about doing so but I can't stull find exactly what im looking for.. For instance Charm mod coffee potion ctor: public CoffeePotion() { super("coffee", false, 0x160202, 3); List<PotionEffect> effects = new ArrayList<>(); effects.add(new PotionEffect(MobEffects.SPEED, Coffee.duration * 20)); effects.add(new PotionEffect(MobEffects.HASTE, Coffee.duration * 20)); effects.add(new PotionEffect(MobEffects.STRENGTH, Coffee.duration * 20)); PotionEffect[] potionEffects = effects.toArray(new PotionEffect[0]); type = new PotionType(name, potionEffects).setRegistryName(new ResourceLocation(getModId(), name)); ProxyRegistry.register(type); ItemStack cocoa = new ItemStack(Items.DYE, 1, 3); PotionHelper.addMix(PotionTypes.WATER, Ingredient.fromStacks(cocoa), type); } I see that here the author is creating a PotionType rather than using an already existing Potion. What PotionCore provides is a bunch of Potions > package net.minecraft.potion.Potion However PotionHelper.addMix only seems to work with PotionType 😕 Im a bit lost over here xd Any help appreciated
  20. Hi there, I've setup a Thermos (Forge + Spigot + Bukkit) server with 46 mods mostly based on Thaumcraft and Witchery for PVP playthrough. Ware features: MEM: 8GB RAM CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz EU located Join our discord! > https://discord.gg/RpuP2Vs, we have players from Spain, Russia, Romania, France, and many other places Please visit the website as most of the information here is already included here > http://iskra.ciroreed.net/. The website highlights relevant information about the server, status, online players, and also a dynmap to check everything. In order to join this server you have to download the installer or use the contents within the zip archive to meet the required configuration (check the downloads on the site). Balance: We've disabled wand focus casting in faction claimed territory so portable hole and warding is not allowed to prevent griefing, etc. Some powerful armors have been disabled too. Ask for details on discord. Features: Mods: Thaumcraft 4 + several addons, NEI, Aether, Bibliocraft, Chisel, Dragon mounts. Plugins: Factions, LoginSecurity, WorldBorder. Pregenerated map, high TPS. Automatic world backups. Rules: Be respectful. Do not spam the chat. Do not camp near the spawn for newcomers (severe punish). Help staff members to find bugs or glitches. Use discord to discuss about the server or make suggestions. Remember that PVP is enabled. (You can completely avoid PVP, ask an admin for it) Recomended playthrough: Gather some resources. Create your faction or join any. Check the factions guide for more info. Manage your land, tweak your land rules or flags to avoid pvp, monster spawn, explosions, etc. Fight on the leaderboard to achieve awards every week.
  21. What is your opinion about render models with Java code directly? Is hard? you have a recommendation?
  22. So i cant use models.json in 1.7.10? this feature is only for 1.8x?
  23. I mean this format. https://www.dropbox.com/s/2o222dcz0pyiidv/ship.json?dl=0 Does forge have some utility to import this? I see in code this packages which have some utilities thought net.minecraftforge.client.model.* Thanks
  24. Hi there, im the owner and creator of this community https://www.facebook.com/MinecraftIskra/ We created a modded server to test this awesome mod "MinefantasyII". We tested for two weeks. Is working fine so we decided to open a public server for everybody. Mainly we are spanish, but there are a lot of players of south america who join daily. We would like to expand this community About the server: Rules: Be polite.. blabla. our PVP system bring popular justice, and if this is not enough admins will burn you. There are 'protected regions' which are announced when the eplayer pass through. We don't like bugs, we tested arround 2 weeks but and we fixed many. But if someone profits from any unseen bug, he will be punished. When join you receive a book which contains a guide to understand how to deal with the coremod. Anyway vanilla recipes are enabled. There are 4 dimensions, 3 vanilla 1 twilight forest. Overworld is restricted by WorldBorder. Limit is 1000 block radius! That is huge! Factions rule the antigrief system. If you don't know how to deal with this popular plugin write "/f help" in game or check the docs. Have fun! DOWNLOADS: Installer (will erase whole .minecraft folder to create one with desired files) : https://www.dropbox.com/s/dohhxw866nnmoty/ISKRA_warcraft.exe?dl=0 Update Java to latest versión! SERVER ADDRESS: iskra.ciroreed.net (81.169.232.242)
×
×
  • Create New...

Important Information

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