Jump to content

ciroreed

Members
  • Posts

    31
  • Joined

  • Last visited

Posts 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. 3 minutes ago, Beethoven92 said:

    Entities already provide a tick method..you can override that method in a custom entity (that extends the Entity class) and do what you want with it, and that includes counting how many ticks have passed since the entity was created (which coincide with you right clicking with the wand)

        world.spawnEntity(new Entity() {
          @Override
          onUpdate() {
    
          }
        });

    i don't have any idea what im doing xd

  3. 2 hours ago, diesieben07 said:

    You cannot interact with most things in Minecraft from threads other than the main thread.

    You need to count ticks.

    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"

  4. 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

     

    46 minutes ago, Beethoven92 said:

    Let me understand this: do you want the explosion to happen 1 second after you use you wand (at the position the player used the wand)..or you want the explosion to happen as soon as you use the wand but at a position where the player was 1 second earlier?

     

    Yup, casting and then, after a second, an explosion raises where u just casted

     

  5.   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

     

  6. 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!

  7. 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)

     

  8. 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);
    	}

     

  9. 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 :)

     

  10. 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.

     

  11. 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.