Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BlazeAxtrius

Members
  • Joined

  • Last visited

Everything posted by BlazeAxtrius

  1. crashes dedicated Forge (1. server b1309 while searching for client side classes crash report: http://pastebin.com/4f82r6s2 fml server latest (last 400 lines): http://pastebin.com/gzewKsuD Someone send me these links and from what I understand the game crashes because of my mod. I don't know what the problem is tho. My guess is that the ID match with something else but no sure. What is the problem and how can i fix it?
  2. Thank you very much. They are now working properly.
  3. What code? In eclipse everything works. I can't give you any code. Here is an example of a rail if it will even help. public static Block monorailWhite whiteWoolRail = new AllRails(3081).setUnlocalizedName("whiteWoolRail");//setBlockTextureName("expandedrails:WhiteWoolRail"); GameRegistry.registerBlock(whiteWoolRail, "whiteWoolRail"); whiteWoolRail.setCreativeTab(this.tabNormalRails); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(net.minecraft.item.Item.getItemFromBlock(whiteWoolRail), 0,new ModelResourceLocation(modid+":"+"whiteWoolRail", "inventory")); public class AllRails extends BlockRail { public AllRails (int par1) { super(); setHardness(0.7F); setStepSound(Block.soundTypeMetal); }
  4. Stop using the Language Registry and use a lang file like a normal person. Ok I made the lang file and the rails have their names but still don't have textures.
  5. Ok so when i build the mod with "gradlew.bat build" I get this warning. warning: [options] bootstrap class path not set in conjunction with -source 1.6 Note: C:\Users\BlazeAxtrius\Desktop\Minecraft\finallllll8\build\sources\java\com\expanded\rails\mod\ERMBase.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. in the build/libs folder I get a jar file that has : folders : META-INF, com, assets files: META-INF, com, assets and the mcmod.info Also in eclipse I dont get any errors related to the models or textures. When I close minecraft I get this error : Using incremental CMS is deprecated and will likely be removed in a future release Which is because of this line : LanguageRegistry.addName(whiteWoolRail, "White Wool Rail");
  6. So now my assets aren't working. I don't know what I did wrong.
  7. Well thanks for the help. I removed all the rails that are excluded from the mod and now it worked.
  8. i selected the files in eclipse and there was an Exclude option.
  9. Yeah but the errors are from files that I have excluded. So they dont interest me for now. This :compileJava FAILED is my main problem.
  10. So i get this error when I try to build my mod. 36 errors 1 warning :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. The warning is : warning: [options] bootstrap class path not set in conjunction with - source 1.6
  11. Just about sums up your Java knowledge... The fact that it crashed meant that the code was correct and the only line that doesn't work is the int .... That is how I managed to fix the other Rails. When the game crashes,the crashes report only shows the int... line to be the problem which it is. Before if the code is correct like what Draco18s suggested fixed the problem but the rail property wasnt working. Now the property actually works but I just cant finish this last line of code.
  12. Every time I try something. I go in the game and use the minecart to go over the rail. Mostly the game doesn't crash which means that the code doesn't work even tho it doesn't show errors. With .equals the game crashed so I was left with the impression that it works. It is just this "& 0x7" part I have no idea how to fix. It is an "Int" which isn't specified but I don't to what I have to change it.
  13. I tried so many things. I can't figure it out.
  14. BlockState state = getBlockState(); if ((Boolean)state.equals(POWERED)) This works. only this thing I have no idea how to fix. int blockMetaWithoutPoweredBit = state & 0x7;
  15. It doesn't work. It wants to be BlockState state = getBlockState(); and .get(isPowered). It says "The method get(boolean) is undefined for the type BlockState IBlockState state = getBlockState(); if ((Boolean)state.get(isPowered))
  16. I have a problem with the lines : if((blockMetaData & 0x8) == 0) int blockMetaWithoutPoweredBit = blockMetaData & 0x7; It says that "&" is undefined for the argument type(s) IBlockState, int Here is the full code: public void onMinecartPass(World world, EntityMinecart cart, BlockPos pos) { //cm = blockID if (world.getBlockState(pos) == ERMBase.monorailPowered) { IBlockState blockMetaData = world.getBlockState(pos); if ((blockMetaData & 0x8) == 0) { double var24 = Math.sqrt(cart.motionX * cart.motionX + cart.motionZ * cart.motionZ); if (var24 < 0.03D) { cart.motionX *= 0.0D; cart.motionY *= 0.0D; cart.motionZ *= 0.0D; } else { cart.motionX *= 0.5D; cart.motionY *= 0.0D; cart.motionZ *= 0.5D; } } else { int blockMetaWithoutPoweredBit = blockMetaData & 0x7; double var41 = Math.sqrt(cart.motionX * cart.motionX + cart.motionZ * cart.motionZ); if (var41 > 0.01D) { double var43 = 0.06D; cart.motionX += cart.motionX / var41 * var43; cart.motionZ += cart.motionZ / var41 * var43; } else if (blockMetaWithoutPoweredBit == 1) { if (world.isBlockIndirectlyGettingPowered(pos) == pos.getX() - 1) { cart.motionX = 0.02D; } else if (world.isBlockIndirectlyGettingPowered(pos) == pos.getX() + 1) { cart.motionX = -0.02D; } } else if (blockMetaWithoutPoweredBit == 0) { if (world.isBlockIndirectlyGettingPowered(pos) == pos.getZ() - 1) { cart.motionZ = 0.02D; } else if (world.isBlockIndirectlyGettingPowered(pos) == pos.getZ() + 1) { cart.motionZ = -0.02D; } } } } }
  17. Did some of the comments get deleted? Anyway if I change : int i1 = par1World.getBlockMatedata(x, y, z); to IBlockState i1 = par1World.getBlockState(pos); public void onNeighborBlockChange(World par1World, BlockPos pos, Block par5) { if (!par1World.isRemote) { IBlockState i1 = par1World.getBlockState(pos); IBlockState j1 = i1; //if (this.isPowered) if (this.isPowered()) { j1 = i1 & 7; } this.isPowered() is still not working - It says that it is unidentified. and j1 = i1 & 7 isnt working. It says "The operator & is unidentified for argument type IBlockState, int
  18. And what problem would that be? I can't look at a block of code and magically understand your problem(s) int i1 = par1World.getBlockMetadata(par2, par3, par4); I don't know how to fix this, because if I change .getblockMetadata... It will ask me to change int i1 to IBlockState i1 and this makes the rest of the code in errors this.func_150048_a(par1World, pos, i1, j1, par5); - this func_150048_a. What is it? if (this.isPowered()) - I don't how to fix this.
  19. Ok thanks, I finally managed to fix it. @Override public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos) { if (worldObj.getBlockState(new BlockPos(pos)).getBlock() == ERMBase.triplerailArmed) { IBlockState blockMetaData = worldObj.getBlockState(new BlockPos(pos)); worldObj.createExplosion(cart, pos.getX(), pos.getY(), pos.getZ(), 0.3F, false); worldObj.newExplosion(cart, pos.getX(), pos.getY(), pos.getZ(), 3.5F, true, true); } } I just found an other problem, that I have. public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { //return !par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4); return !par1World.doesBlockHaveSolidTopSurface(par1World, par2, par3 - 1, par4); THIS HERE } //public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, Block par5) { if (!par1World.isRemote) { int i1 = par1World.getBlockMetadata(par2, par3, par4); AND THIS int j1 = i1; //if (this.isPowered) if (this.isPowered()) AND THIS { j1 = i1 & 7; } boolean flag = false;
  20. public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos x, y, z) That doesn't work.
  21. BlockPos.x? Jesus. It might be xpos, or posx, I haven't actually used 1.8 yet, but I can't imagine its that difficult. public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos1) This makes the @Override work and the rail itself works. However when i pass over the rail the game crashes. worldObj.createExplosion(cart, x, y, z, 0.3F, false); worldObj.newExplosion(cart, x, y, z, 3.5F, true, true); createExplosion require 3 int meaning "int x, int y, int z" public Explosion createExplosion(Entity p_72876_1_, double p_72876_2_, double p_72876_4_, double p_72876_6_, float p_72876_8_, boolean p_72876_9_) If i write this, the @Override and the rail properties dont work at all. But it doesnt show any errors. public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos1, int x,int y, int z) I need these "int x, int y, int z" to become "BlockPos x, BlockPos y, BlockPos z" or something like that but then if (worldObj.[b]getBlockState(pos1)[/b].getBlock() == ERMBase.armedRail) { IBlockState blockMetaData = worldObj.[b]getBlockState(pos1)[/b]; these 2 things dont work.
  22. Thanks I fixed it now. But public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos1) { if (worldObj.getBlockState(pos1).getBlock() == ERMBase.armedRail) { IBlockState blockMetaData = worldObj.getBlockState(pos1); worldObj.createExplosion(cart, [b]x, y, z[/b], 0.3F, false); worldObj.newExplosion(cart, [b]x, y, z[/b], 3.5F, true, true); } } Ths BOLD things I dont know how to fix
  23. public void onMinecartPass(World world, EntityMinecart cart, BlockPos pos1) { if (world.getBlockState(pos1) == ERMBase.chainRail) { IBlockState blockMetaData = world.getBlockState(pos1); double var41 = Math.sqrt(cart.motionX * cart.motionX + cart.motionZ * cart.motionZ); if (var41 < 0.05D) { double var43 = 0.1D; cart.motionX += cart.motionX / var41 * var43; cart.motionZ += cart.motionZ / var41 * var43; } else { cart.motionX += 0.0D; cart.motionZ += 0.0D; } } In this rail it doesn't show any errors and the @Override works but it still doesn't work. Also If i try to convert it from "int x, int y, int z" to BlockPos. getBlockState() requires 1 BlockPos while createExplosion requires 3 int and I have no idea how to do that. I tried to fix it but when i go over the rail the game crashes. Also it might be basic java but I made this with a friend from watching tutorials and I have no idea what I am doing right now but I still want to make the mod work.
  24. I seriously don't get it.
  25. How can I call it from "EntityMinecart" since its there. I updated my GitHub if it makes things easier. https://github.com/BlazeAxtrius/ExpandedRailsMod

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.