Jump to content

Recommended Posts

Posted

Across all my mods, it seems like all my TESRs are sharing a tile entity instances, that are bound to the same tile entity. The solar panel and wind turbines are sharing one.

For instance, in LabStuff, if more one wind turbine entity is in view, they both start spinning faster, or if one is in no-spin conditions, but the others are, they all start spinning. Regardless of y-position or ability to see the sky.

In DLStuff, if you right click while holding left-control and are holding an unprogrammed d-pad on a laptop, you plug it in to download the os. But if you do it again, you get it back. This also renders a d-pad and cord plugged into the back of the laptop. But if you take the d-pad out, or destroy the block and replace it even, the d-pad is still being rendered.

Any ideas?

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

Because when I remove the variable for the model, I have to start referencing the class directly when it comes time to render.

When I do that it says I have to make renderModel static.

When I do that it says I need to make Screen, Keys, Cord, and Tablet static as well.

Those are the parts BTW.

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

Well that fixed the problem of getting the tablet back.

But in my testing world, both laptops show the tablet. Im not sure if they share the tablet tough. Like you can put it one and take it out another.

The tile entity is located in the tileentity package, duh.

And if you ask me why I have the tablet stored in a custom variable, yet still have a container set up. I used to have a whole different setup for putting the tablet in, so theres where the container comes from. And the other thing, I forgot.

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

Well now the tablet doesn't render, and sometimes I can't get it back from the laptop.

What about the tablet boolean in the TE, should that be static or no?

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

What about the boolean in the tile entity?

Should that be static or no, cause currently I can't get the renderer to get it to be true, even if I put in a tablet

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

I fixed it but you have to open the gui to update it.

I tried adding the call to open the gui to the statements in the block where I check to see if I'm taking out or putting in a tablet, but that didnt work.

Help?

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

to be specific I get this error:

java.lang.NullPointerException: Ticking memory connection
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:620)

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

If the lcontrol is pressed and your not sneaking when you right click the laptop, it checks to see if it is false(I found a weird bug where i had to change the boolean to reflect if there wan't a tablet, so to render it needs to be false) and if it is it adds the tile entities store tablet item to your inventory and sets the TEs to null. It then sets noTablet to true. If noTablet was true(meaning the port is open) it takes the dPad from you, sets the tablet item, and sets noTablet to false.

I also have a addCraftingToCrafters and releated methods setup in the container, but to call it the GUI must be opened. I can't send a packet because server to client packets don't work because you said I'd never need them.

 

//no lcontrol if statement
else if(!player.isSneaking() && Keyboard.isKeyDown(Keyboard.KEY_LCONTROL))
        	{
        		TileEntityDLLaptop te = (TileEntityDLLaptop)world.getTileEntity(x, y, z);
        		if(!te.noTablet)
        		{
        			player.inventory.addItemStackToInventory(te.tabletItem);
        			te.noTablet = true;
        			te.setTabletItem(null);
        			world.markBlockForUpdate(x, y, z);
            		player.openGui(DLStuff.instance, 0, world, x, y, z);

        			return true;
        		}
        		else if(player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().isItemEqual(new ItemStack(DLStuff.itemUnProgrammedDPad)))
        		{
        			player.inventory.decrStackSize(player.inventory.currentItem, 1);
        			te.setTabletItem(new ItemStack(DLStuff.itemUnProgrammedDPad));
            		te.noTablet = false;
            		world.markBlockForUpdate(x, y, z);
            		player.openGui(DLStuff.instance, 0, world, x, y, z);
            		return true;
        		}
        		return false;
        	}

 

public void detectAndSendChanges()
    {
        super.detectAndSendChanges();

        for (int i = 0; i < this.crafters.size(); ++i)
        {
            ICrafting icrafting = (ICrafting)this.crafters.get(i);

            if (this.lastTablet != this.tile.isTablet())
            {
            	int tabletInt;
            	if(this.tile.isTablet())
            		tabletInt = 1;
   			 	else
   			 		tabletInt = 0;
                icrafting.sendProgressBarUpdate(this, 0, tabletInt);
            }
        }
        this.lastTablet = tile.isTablet();
    }
    

	@SideOnly(Side.CLIENT)
    public void updateProgressBar(int p_75137_1_, int p_75137_2_)
    {
        if (p_75137_1_ == 0)
        {
        	boolean tablet;
        	if(p_75137_2_ == 0)
        		tablet = true;
        	else
        		tablet = false;
            this.tile.setTablet(tablet);
            System.out.println("Updated client tablet, " + tablet);
        }
    }

	 public void addCraftingToCrafters(ICrafting p_75132_1_)
	 {
		 super.addCraftingToCrafters(p_75132_1_);
		 int tabletInt;
		 if(this.tile.isTablet())
			 tabletInt = 1;
		 else
			 tabletInt = 0;
		 p_75132_1_.sendProgressBarUpdate(this, 0, tabletInt);
	 }

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Posted

Oh yeah,

I originally had a whole gui for the drives of the computer but scratched it due to, problems.

Maybe I'll have it so if your holding a tablet, it gets put in. And then if I can get it to be able to call the gui from the tablet if block, I should be good.

[shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I also just tried with iron's spellbooks removed, since that seemed related, but i am still having the same problem, even in newly created worlds. https://mclo.gs/AtrAfaj 
    • My Gradle Project for my Minecraft mod isn't building. Terminal: * Where: Settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle' line: 2 * What went wrong: Could not compile settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle'. > startup failed:   settings file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\settings.gradle': 2: The pluginManagement {} block must appear before any other statements in the script.   For more information on the pluginManagement {} block, please refer to https://docs.gradle.org/9.0.0/userguide/plugins.html#sec:plugin_management in the Gradle documentation.    @ line 2, column 1.      pluginManagement {      ^   1 error * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to generate a Build Scan (Powered by Develocity). > Get more help at https://help.gradle.org.   Setting.Gradle File:   rootProject.name = 'fusion-lucky-block' pluginManagement {     repositories {         gradlePluginPortal()         maven { url "https://maven.minecraftforge.net/" }         mavenCentral()     } }
    • no change still. here's a new log  https://mclo.gs/RXwiZmn 
    • Whenever I go to build my it says "Build failed in " how many seconds   Here is what is said in my terminal * Where: Build file 'C:\Users\csonn\OneDrive\Desktop\fusionlucky\build.gradle' line: 3 * What went wrong: Plugin [id: 'net.minecraftforge.gradle', version: '6.1.51'] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (No included builds contain this plugin) - Plugin Repositories (could not resolve plugin artifact 'net.minecraftforge.gradle:net.minecraftforge.gradle.gradle.plugin:6.1.51')   Searched in the following repositories:     Gradle Central Plugin Repository     MinecraftForge(https://maven.minecraftforge.net/) * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Get more help at https://help.gradle.org.   Here is what is in my build.gradle file plugins {     id 'java'     id 'net.minecraftforge.gradle' version '6.1+' }   group = 'io.github.csonnic03.fusionlucky' version = '1.0.0' archivesBaseName = 'fusionlucky'   java {     toolchain {         languageVersion = JavaLanguageVersion.of(17)     } }   repositories {     mavenCentral()     maven {         name "forgeMaven"         url "https://maven.minecraftforge.net/<repository>" } }   dependencies {     minecraft 'net.minecraftforge:forge:1.20.1-47.1.0' }   minecraft {     mappings channel: 'official', version: '1.20.1'     runs {         client {             workingDirectory project.file('run')         }         server {             workingDirectory project.file('run')         }     } }   tasks.withType(JavaCompile) {     options.encoding = 'UTF-8' }   jar {     manifest {         attributes(             "Specification-Title": "Fusion Lucky Block",             "Specification-Vendor": "example",             "Implementation-Title": project.name,             "Implementation-Version": project.version,             "Implementation-Vendor": "example",             "ModLauncher-TargetFMLVersion": "[47,)"         )     } }  
  • Topics

×
×
  • Create New...

Important Information

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