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

Cadiboo

Members
  • Joined

  • Last visited

Posts posted by Cadiboo

  1. Please provide your logs from .minecraft/logs (more info in my signature). Your debug.log is best, but the latest.log is fine if debug.log doesn’t exist. If your logs are large please use a service like GitHub Gist or Pastebin

  2. 2 hours ago, Torq said:

    Do I have to do this for every class in net.minecraft.block?

      Reveal hidden contents
    
    
    package torq.torqmod.block;
    
    import java.util.Random;
    
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockOre;
    import net.minecraft.block.state.IBlockState;
    import net.minecraft.util.IItemProvider;
    import net.minecraft.util.math.BlockPos;
    import net.minecraft.world.World;
    import net.minecraftforge.common.ToolType;
    
    /**
     * 
     * 
     * @author torq
     * @version 0.1
     */
    public class ModBlockOre extends BlockOre {
    
    	public int harvestLevel = 3;
    	public ToolType toolType = ToolType.PICKAXE;
    
    	public ModBlockOre(Block.Properties builder) {
    		super(builder);
    	}
    
    	@Override
    	public IItemProvider getItemDropped(IBlockState state, World worldIn, BlockPos pos, int fortune) {
    		return (IItemProvider) this;
    	}
    
    	@Override
    	public int quantityDropped(IBlockState state, Random random) {
    		return 1;
    	}
    
    	@Override
    	public int getHarvestLevel(IBlockState state) {
    		return harvestLevel;
    	}
    
    	@Override
    	public ToolType getHarvestTool(IBlockState state) {
    		return toolType;
    	}
    }

     

     

    No. Can you please clarify what you’re trying to do again? 

  3. 12 minutes ago, LaDestitute said:

    ContainerBase (which implements BlockContainer)

    Don’t extend BlockContainer, it’s legacy vanilla code. Simply override Block#hasTileEntity(IBlockState) and Block#createTileEntity(IBlockState)

     

    12 minutes ago, LaDestitute said:

    How do I get it to auto-trigger if any entity walks up to seven blocks away from it's south-face (if that's possible or if it's a limit of one block?), while accounting for blocks blocking line of sight (a block blocking in any portion of the range of line = no activation)? I have a hunch I'd have to use raytracing, probably, right? Not gonna post my TE code cause it's 95% vanilla code.

    Tickable tile entities can do whatever they want in their onUpdate method (renamed tick in 1.13). You can use TileEntity#getPos, BlockPos#offset(EnumFacing, int), AxisAlignedBB(BlockPos) and World#getEntitiesInsideAABB to find all entities up to 7 blocks away from your TE in any direction. As a general rule, don’t copy the vanilla code exactly, it’s usually not very good (vanilla operates in an “if it ain’t broke don’t fix it” way) and Forge usually has better ways of doing what you want. That said, vanilla is an excellent reference, but it’s not great to just copy paste vanilla code.

     

    16 minutes ago, LaDestitute said:

    due to how my mod registers blocks/items (with a static list and "ModBlocks.BLOCKS.add(this);" and "ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));" ), it kind of breaks the blockstates for my trap and the constructor/constructor values like Hardness.

    This likely means you followed a sub-par YouTube tutorial about how to setup your mod. Don’t use static initialisers (see http://www.minecraftforge.net/forum/topic/70095-1122-custom-tree-problems/?do=findComment&comment=339598 for an explanation), your registration can be massively simplified and clean up (see https://gist.github.com/Cadiboo/b825d62fb46538e7b7b262c5612d62aa and https://gist.github.com/Cadiboo/3f5cdb785affc069af2fa5fdf2d70358)

  4. 2 hours ago, Torq said:

    I can override Block and rewrite everything else, inheriting from Block, but then ModBlockGlowstone! = BlockGlowstone, although they will be exactly the same. That's why I say that I will have to override every class in net.minecraft.block

    BlockGlowstone inherits the method from Block because it extends it. You can override it just fine while still extending BlockGlowstone

  5. 13 minutes ago, TheRPGAdventurer said:

    deleting .git

    .git contains all the information about your local repository including all the data about your files that is used to build the diffs that git works with when you push changes. I suggest that you save your current progress locally by moving your src folder (and everything else you changed) to another folder (your desktop is a good place) and deleting your local version of your repository. Then clone your remote repository and then add your local changes back. 

  6. 4 hours ago, DoctorLOGiQ said:

    Does some kind of synchronisation need to happen?

    By default capabilities are not synced to the client. However I would assume that Choonster’s code would have something in it to sync the values. Choonster said that the 1.13.2 update if their test mod is very WIP, so it might not be on GitHub it even written yet.

  7. 7 hours ago, oHomer said:

    Received fatal alert: handshake_failure

    You need to be able to download files from forge files from the internet. Make sure that your antivirus allows access to forge and that access to forges maven is not blocked by a proxy or your internet settings. 

  8. I’m pretty sure that’s a Mac application crash report (not a minecraft one)

    5 hours ago, ProdigyOfGenres said:

    Terminating app due to uncaught exception 'JavaNativeException', reason: 'java.lang.NoClassDefFoundError: Could not initialize class sun.lwawt.macosx.LWCToolkit'
    terminating with uncaught exception of type JNFException

    Somethings going horribly wrong with Java. Did you change any of your launcher options? Does normal minecraft work fine?

  9. 1 minute ago, Thegametutor101 said:

    I create a method in the Proxies named "addOBJLoaderDomainIfOnClient" that has inside of it the OBJLoader.addDomain.

    No, you create an empty method if you’re using a normal class or an abstract method if your using an abstract class or define a method if your using an interface.

    2 minutes ago, Thegametutor101 said:

    Then in my RegistryHandler (where I register all items/blocks @BusSubscribeEvent) I would call the method in my proxy through a @SubscribeEvent.

    This would work but it doesn’t make sense to call it from there, you would call the method in preInit.

    3 minutes ago, Thegametutor101 said:

    And finally I have the CommonProxy implement "NOOP"

    If your using a class, yes. NOOP stands for NO OPeration i.e. do nothing.

     

    4 minutes ago, Thegametutor101 said:

    I'm not sure if you mean't I call the "addOBJLoaderDomainIfOnClient" method from the Main's preInit

    or in a "@BusSubscribeEvent" s "@SubscribeEvent".

    If your using a proxy, you would call it from preInit. If you’re doing it in a client event subscriber you can just call it from inside a static initialiser, without any other code at all.

  10. ·

    Edited by Cadiboo

    I would just not use proxies at all. I would put OBJLoader.addDomain in the static initialisers of my client event subscriber.

    Proxies work by having a common interface that both your server and client proxy implement and having a field with @SidedProxy that Forge will fill with an instance of either your server or client proxy class when your mod is loaded. This allows you to run code that will crash on the wrong physical side. For your problem you should have a method in your proxy interface called addOBJLoaderDomainIfOnClient. Then your server proxy should have a NOOP implementation (an implementation that doesn’t do anything at all) and your client proxy should have an implementation that calls OBJLoader.addDomain. You would then call PROXY.addOBJLoaderDomainIfOnClientin preInit. On the dedicated server this would do nothing, and on the client it will register your domain.

    As you can see, proxies are a lot more complicated than sided event subscribers where everything just works(tm).

Important Information

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

Account

Navigation

Search

Search

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.