Jump to content

Xydru

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Xydru

  1. Hey, when will you continue the tutorial?
  2. Whenever I execute runClient to test the example mod, it cant load further than to the point where I get the info, that the example mod has the version 1.16.3 and can't be used in Minecraft Forge 1.16.4. That does not even make sense. I haven't changed anything. This were my steps: Downloading MDK Unzipping it gradlew genEclipseRuns in cmd gradlew eclipse in cmd gradlew build in cmd import project in eclipse execute runClient This is the crash report I got: https://hastebin.com/makosiwifu.yaml I would be very glad if someone could figure out, why it doesn't work. I do not want to change to older forge versions of 1.16.4.
  3. Can you please help me? There are no other forums like this that deal with Minecraft Forge Modding. If I do not get help here, I do not get help anywhere.
  4. Hello, I want to create a block like the target block in Minecraft 1.15 (and also 1.7.10. I want the mod for both versions to be available for, but it is okay if I only get an answer that helps me with the 1.15 version even if it would be much better if someone could help me to get a working 1.7.10 version of the mod). I am a beginner in Forge Modding, so I am struggling a lot with it. The block should detect arrows that hit him and then tell me where they hit him, so I can calculate a number that should present by a redstone signal how close the block to the center is. But my problem is that I do not know how the block can tell me where the arrow is. I tried to copy some code of the target of the OpenBlocks Mod, but they have created classes like TileEntityTarget, that extends SyncedTileEntity that extends OpenTileEntity that extends TileEntity so I ended up with trying to edit the code and failing a lot... Here is my code: @Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { if (!world.isRemote && entity != null && entity instanceof EntityArrow) { if (lastEntityHit != entity.getEntityId()) { lastEntityHit = entity.getEntityId(); return; } lastEntityHit = entity.getEntityId(); onTargetHit(world, x, y, z, Vec3.createVectorHelper(entity.posX, entity.posY, entity.posZ)); } } public void onTargetHit(World world, int x, int y, int z, Vec3 entityPosition) { if (world.isRemote) return; final TileEntity target = getTileEntity(world, x, y, z, TileEntity.class); if (target == null) return; Vec3 bullseye = Vec3.createVectorHelper(x, y, z); double distance = entityPosition.distanceTo(bullseye); BlockTargetBlock.setStrength(15 - Math.min(15, Math.max(0, (int)(distance * 32)))); } @Override public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int m) { final TileEntity tile = getTileEntity(world, x, y, z, TileEntity.class); return tile != null? BlockTargetBlock.getStrength() : 0; } @Override public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int m) { return isProvidingWeakPower(world, x, y, z, m); } @Override public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) { setBlockBoundsBasedOnState(world, x, y, z); return super.getSelectedBoundingBoxFromPool(world, x, y, z); } @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { setBlockBoundsBasedOnState(world, x, y, z); return super.getCollisionBoundingBoxFromPool(world, x, y, z); } private TileEntity getTileEntity(IBlockAccess world, int x, int y, int z, Class<TileEntity> class1) { return (worldObj != null && worldObj.blockExists(x, y, z))? worldObj.getTileEntity(x, y, z) : null; } public static void setStrength(int strength) { BlockTargetBlock.strength = strength; tickCounter = 10; worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, null); } public static int getStrength() { return strength; } I would be glad if someone could help me out. They don't have to give me the code, it would be enough if I could get a tip or a link to an article or video or something like this that could explain me how I can do it or at least give me also useful tips. Greetings, Xydru
  5. Today I wanted to create a Minecraft Mod for version 1.7.10. I used to do it with older versions and never had any problems. Now, however, I am failing to set up the downloaded folder. The command 'gradlew setupDecompWorkspace' and sometimes 'gradlew setupDevWorkspace' is said to should be used. Of course, I entered the correct folder before entering this command. The environment variables are also set up under JAVA_HOME. So far I've tried a Java 8 JDK (jdk1.8.0_251) and a Java 7 JDK (jdk1.7.0_80). Also, the right JREs are installed. The Minecraft Forge SRC versions I use are the latest and the recommended. However, no matter what I did, I always ended up with the same error message (since it is very long, I used a link): https://hastebin.com/idaxikacoz.rb I also added the command --refresh-dependencies to the back, just in case, but that didn't help either. If someone knows about it, I would be grateful if they could help me. Xydru
×
×
  • Create New...

Important Information

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