Jump to content

The_Fireplace

Forge Modder
  • Posts

    243
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by The_Fireplace

  1. I made a translucent block, and now, when placed, it lets the player see through any block next to it. See the following screenshot:

    Pch1kIA.png

    And my block code:

     

     

    /**
    * 
    * @author The_Fireplace
    *
    */
    public class BlockUnLogicGemNeutral extends Block {
    
    public BlockUnLogicGemNeutral() {
    	super(Material.iron);
    	setCreativeTab(UnLogicII.TabUnLogicII);
    	setUnlocalizedName("unlogic_gem_block_neutral");
    	setLightOpacity(14);
    }
    
    @Override
    public boolean isVisuallyOpaque()
    {
    	return false;
    }
    
    @Override
    public boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon)
    {
    	return true;
    }
    
    @Override
    @SideOnly(Side.CLIENT)
    public EnumWorldBlockLayer getBlockLayer(){
    	return EnumWorldBlockLayer.TRANSLUCENT;
    }
    }
    

     

     

    I did the block json files just like normal, nothing out of the ordinary. Anyone know how to fix this?

  2. The issue is that you extend EntityItem (which is the entity used when you drop an Item on the ground) but never tell it what ItemStack it should represent.

    Thanks.

    Also: Your code is a giant mess full of lurking errors, but I am not in the mood to go over them all. But you should seriously consider learning Java more in-depth.

    I know, and I am working on it.

     

    Thanks for taking the time to look in to this and help, I appreciate it.

  3. Ok, to set it up, what I do is clone it, download the latest version of Minecraft Forge, open the zip and delete the arc folder, then extract it over my existing files, replacing any that are the same. Then, I run setupforge.bat(a simple batch file, it runs gradlew setupDecompWorkspace then gradlew eclipse. Then, open eclipse and set it to the workspace as normal, and make sure to add the 2 jarslibsthe libs folder to the build path, as they are Fireplace Core sources and deobf.

    Yeah, no that's not how to make a repo.

    Clone + setupDecompWorkspace is enough if you provide the wrapper. See here for an example.

    Ok, should work now

  4. Ok, to set it up, what I do is clone it, download the latest version of Minecraft Forge, open the zip and delete the arc folder, then extract it over my existing files, replacing any that are the same. Then, I run setupforge.bat(a simple batch file, it runs gradlew setupDecompWorkspace then gradlew eclipse. Then, open eclipse and set it to the workspace as normal, and make sure to add the 2 jarslibsthe libs folder to the build path, as they are Fireplace Core sources and deobf.

     

    To reproduce the issue, run the client, make a new world in creative, get a Coal Gun out of the UnLogic II creative tab. Right click while holding it to make the error.

  5. It has nothing to do with placing a block. It's simple the name of the packet for "right click" (you right-click your item, this packet is sent and tells the server you right-clicked).

     

    For finding the issue, put a conditinoal breakpoint in DataWatcher.writeTo (only break if it's your entity, otherwise you get notified for every entity that's spawned). Then check which slot is null and find out why.

    Alright, did that(again and again and again), and I can't find any reason for it to be doing that. The itemstack in DataWatcher.writeTo is ItemBlockCoalGun, not null, and I have tried putting waypoints in various other spots mentioned in the error, all look like they should be working fine.

     

    Perhaps it just needs a fresh set of eyes. Anyways, I have made the mod open source for now, so it is easier to fix. Here is the link to the source. Any help is very much appreciated, and I will keep looking, and will let you know if I find the issue.

    EDIT: Here is the link to the error now, I renamed and moved the dummy block appropriately: http://paste.ubuntu.com/10971581/

  6. Ok, first: You are not checking if you're on the server when spawning the entity. That will leave ghost entities behind.

    The actual issue is further down the exception chain: Some entry in your Entity's DataWatcher contains an invalid ItemStack.

    Ok, I see what you are saying, and have since fixed the ghost entities.

    As for the main issue, how would I go about finding and fixing it? I have looked and looked and can't find where it could be.

     

    On a side note, it looks to me like it is expecting to place it as a block and can't, and that could be why.

    at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:607) [NetHandlerPlayServer.class:?]
    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:67) [C08PacketPlayerBlockPlacement.class:?]
    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:114) [C08PacketPlayerBlockPlacement.class:?]
    

  7. Aren't you the rude one. :P I made a mistake when looking at it just like everyone does. I do not appreciate being called "stupid" based upon one post.

    Yes, everyone makes mistakes, as I did when wording that last post. I did not intend to call you stupid, but the people I had a discussion with earlier, but that was on a different, completely unrelated website, so I won't get in to that.

    And if you were referring to my first response, saying something stupid does not make you stupid. There are many smart people who say stupid things from time to time.

  8. "you can render a 3D model with an Item just fine"

    Could I see an example of that? Last time I tried finding out all I got was to make a dummy block.

    http://www.minecraftforge.net/forum/index.php/topic,29471.msg152198.html#msg152198

    "Thank you for that quite insulting way of putting it"

    Sorry, I have dealt with a few too many stupid people today.

     

    As for the code example, it is in this file somewhere, I am on my phone right now, so it is easier just to post the file without narrowing it down. Here: https://dl.dropboxusercontent.com/s/t6307cffhs1flf1/The_Fireplace_unlogic-ii_master_src_main_java_the_fireplace_unlogicii_UnLogicII.java?dl=0

  9. The error is line 29 of ItemBlockCoalGun which, I think, the entity is hitting the player and it doesn't know what to do. Check if the entity hit is not the player? I'm not really sure but, I think maybe the entity is being spawned incorrectly.

    Don't get me wrong, I appreciate your attempt to help, but, quite frankly, everything you just said was either unhelpful or stupid wrong. I will leave it to you to decide what was unhelpful and what was wrong.

  10. Ok, so I recently switched from using an Item for my gun to a dummy Block, so that I could have a 3D model. Now, when I right click it, it doesn't spawn the ammo, and prints the following error in to console:

    http://paste.ubuntu.com/10971581/

    Here is my code:

    ItemBlockCoalGun: http://paste.ubuntu.com/10947721/

    ItemCoalGun(The dummy block): http://paste.ubuntu.com/10947733/

    EntityCoal: http://paste.ubuntu.com/10947748/

    (doubt the code in the next 2 files is necessary to fix the problem, but here, in case it is)

    ExtendedPlayer: http://paste.ubuntu.com/10947750/

    EnumAmmo: http://paste.ubuntu.com/10947768/

    And I may as well include that I have this in my FMLPreInitializationEvent:

    GameRegistry.registerBlock(coal_gun, ItemBlockCoalGun.class, "coal_gun");

    If you need any more code or details, let me know.

     

    EDIT: I have made the mod open source(for now), here is the full source.

  11. NBT files are not secure, by any means.

    Oh trust me, I know, that is why I said as a temporary solution, meaning a day or two at most. I would still like to to this, as long as it isn't overly difficult to achieve, I don't want to spend a lot of time setting this up when I can be setting up actual security.

  12. I am handling sensitive user data in a mod, and I am planning on adding encryption, and while I work on that, I was hoping perhaps I could store the data in an NBTTagCompound rather than the current format, a text file with a different extension, as a quick, temporary solution to users complaining about being able to read their information by opening the file in a text editor.

  13. Ok, so I am making a way for my item to render with a 3D model, which involved making it into a dummy block with an ItemBlock and a TileEntity, and some special renderers. I am getting a crash when I run the game now, here is the report: https://docs.google.com/file/d/0B0Z9mjGyBjrKbFQ3U3NUWUNoZU0/edit?usp=docslist_api

    And my code:

    https://bitbucket.org/The_Fireplace/unlogic-ii/src/aff2a1c24ec0a2abe9dc101d6fd5b6b2020b06d8/src/main/java/the_fireplace/unlogicii/renderers/CoalGunTESR.java?at=master

  14. ItemBlock needs an ItemBlock(Block) constructor. Modify your ItemBlockCoalGun class and add an ItemBlockCoalGun(Block) constructor.

    public ItemBlockCoalGun() {
                    super(UnLogicII.coal_gun);
                    
                    setMaxStackSize(1);
                    setUnlocalizedName("coal_gun");
            }
    

    Does that not cover the superclass's need for a block? Or does it have to be that way for some other reason?

  15. Ok, so I have done some testing, and if I make a language localization file for Spanish(es_ES) and then put the game in to Mexican Spanish(which I don't have a localization for), it defaults to English instead of Spain Spanish. Shouldn't it default to the same language from another country before going to another language?

×
×
  • Create New...

Important Information

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