Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Atila1091

Forge Modder
  • Content Count

    29
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Atila1091

  • Rank
    Tree Puncher

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

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

  1. I created an attribute to set the digging speed in the BreakSpeed event. My question is if the event is called on the client side? Because if it is, I have to call the setShouldWatch(true); method.
  2. It was not a good idea to use this internal method. Looks like I'll have to use reflection.
  3. I already know what causes the problem: When the player dies the capability is marked invalid and returns: LazyOptional.empty () ;. I am currently using a static internal method: ForgeEventFactory.gatherCapabilities. public static IExample getCapability(Entity entityIn) { return ForgeEventFactory.gatherCapabilities(Entity.class, entityIn, null).getCapability(CAPABILITY).orElseThrow(NullPointerException::new); } See the CapabilityProvider class to understand the problem.
  4. Steps: 1- Have a capability. 2 - Get the capability. Example: public static IExample getCapability(Entity entityIn) { return entityIn.getCapability(CAPABILITY).orElseThrow(NullPointerException::new); } 3 - Use an event. Example: PlayerTickEvent. 4 - Kill the player. (/ kill) 5 - The game throws NullPointerException.
  5. I'm creating a block based on the minecraft chorus plant block. To maintain compatibility I'm using the json forge. The question is if I wrote json correctly, although it is working as expected. Forge json: { "forge_marker": 1, "variants": { "north": { "true": { "submodel": "examplemod:chorus_plant_side" }, "false": { "submodel": { "noside": [ { "model": "examplemod:chorus_plant_noside", "weight": 2 }, { "model": "examplemod:chorus_pla
  6. Solved: public class mcreator_tickHandler { @SubscribeEvent public void tick(PlayerTickEvent event) { double posX = event.player.posX; double posZ = event.player.posZ; if (event.player.dimension == mcreator_aether.DIMID && event.player.posY < -2.0D && event.player.ridingEntity == null && event.player.riddenByEntity == null && !event.player.worldObj.isRemote) { event.player.travelToDimension(0); event.player.setPositionAndUpdate(posX, 256.0D, posZ); } } }
  7. I managed to do my work event. It works with many things, but does not work with teleport. Event: public class mcreator_tickHandler { @SubscribeEvent public void tick(PlayerTickEvent event) { if (event.player.dimension == mcreator_sky.DIMID && event.player.posY < -2.0D) { TestEnvironmentMod.teleportPlayerTosky(event.player, true); } } } Teleport: public static TeleporterDimensionMod skyTeleporter; private static void transferPlayer(EntityPlayer player, int dimID, TeleporterDimensionMod tele, boolean aboveWorld) {
  8. My code does not work when I set for EntityPlayerMP. There is no teleport to one player. What I missed? import mod.mcreator.mcreator_sky; import mod.mcreator.mcreator_sky.TeleporterDimensionMod; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.relauncher.Side; public class TickInGame { private int tickCounter; @SubscribeE
  9. Continued: http://www.minecraftforge.net/forum/index.php/topic,31550.0.html
  10. I have not found someone to help me really. :'( To solve this topic I decompiled the Aether mod 1.2.5 using the MCP, but only 90% of my poblema was completed. http://www.minecraftforge.net/forum/index.php/topic,31521.0.html The public void usePortal(int par1, Teleporter teleporter) it does not exist anymore. I need something to replace it: minecraft.usePortal(((BlockAetherPortal)AetherBlocks.Portal).getDimNumber(minecraft.thePlayer), teleporter); The code adapted to 1.7.10: public class TickHandler { private int tickCounter; @SubscribeEvent public void
  11. How can I make the player teleport to the surface world after falling from a dimension as the Aether mod do? Normal is the player taking damage, which I want to avoid. Please anyone who can help make the class ready, because I never had a lesson of java in life. This is very important for my mod. Translated by google translator.
  12. To remove all edit base class of my mod following the advice of diesieben07 I do resouvir the bucket with water or lava enable my two portals to the sky and hell hard, but new problems appeared: To achieve my objective I recreated the bucket of minecraft and removed the original recipe. The new Class: But the bucket of milk depends on the cow: /** * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig. */ public boolean interact(EntityPlayer p_70085_1_) { ItemStack itemstack = p_70085_1
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.