Jump to content

Where to place my .javas in 1.3.1(Please help with a new problem!)


Recommended Posts

Posted

READ MY NEW PROBLEM BELOW

 

I've noticed in the 1.3.1 update there a lot of new server things in the src (of course since it now merges client and server)

 

And after trying to find the Entity files and biome and worldgen files i found them in the common.net.minecraft.src package and since the render and model files and particle FX files etc are in the client(because client handles rendering and texture) and all the other files are in the server i wondered if i was to do the same things with my files too, so my Render and Model files in the client and my mod_ files and all that in the common, or is it like one package where i place everything.

 

Sorry if this sounds n00bish.

Posted

  • Biome, worldgen, item, block etc (files that go in both client and server) go in the common folder.
  • render, gui, model (client only) files go in the client section.
  • server files go in the server section.
    If you're not sure check where the vanilla minecraft ones are.

Posted
  On 8/13/2012 at 11:28 AM, HoBoS_TaCo said:

  • Biome, worldgen, item, block etc (files that go in both client and server) go in the common folder.
  • render, gui, model (client only) files go in the client section.
  • server files go in the server section.
    If you're not sure check where the vanilla minecraft ones are.

 

How the hell do I tell my BlockFurnace class where my Gui file is?

Posted
  On 8/13/2012 at 2:30 PM, Thor597 said:

How do I access Minecraft.java then?

 

I want to add an effectrenderer like this:

 

AC_EntityBlueSparkle entitybluesparkle = new AC_EntityBlueSparkle(world, d, d1, d2, d3, d4, d5);

ModLoader.getMinecraftInstance().addEffect(entitybluesparkle);

 

but it doesnt work anymore

 

Import it. You can directly import it no problem.

 

But for the files that need to be separated client and server, you can't use the common folder (e.g the one that needs Minecraft.java).

Posted

Oh derp, anyway it had to be ModLoader.getMinecraftInstance().effectRenderer.addEffect but I figured it out!

 

Also, I have a couple other problems:

 

1. My Blocks and Items names does not display when I hover over them

 

2. When I hold my Blocks in my hand they have the right coordinates in the texture file only that they use the texture from terrain png(when theyre just in the inventory or on the ground they have the right texture)

 

3. Where did usePortal go?

 

4. My Mobs look completely fucked up, the texture is messed up and they all use the player model

Posted
  On 8/13/2012 at 4:58 PM, Thor597 said:

Oh derp, anyway it had to be ModLoader.getMinecraftInstance().effectRenderer.addEffect but I figured it out!

 

Also, I have a couple other problems:

 

1. My Blocks and Items names does not display when I hover over them

 

2. When I hold my Blocks in my hand they have the right coordinates in the texture file only that they use the texture from terrain png(when theyre just in the inventory or on the ground they have the right texture)

 

3. Where did usePortal go?

 

4. My Mobs look completely fucked up, the texture is messed up and they all use the player model

 

1. Use this instead of ModLoader.addName(...):

LanguageRegistry.instance().addStringLocalization("yourItemName" + ".name", "en_US", "Your Item Name");

 

2. Do you use getTextureFile() in your block class?

 

3. dunno, but I believe there is an other method / hook for it now

 

4. I have several problems with my entities, too. Here:

http://www.minecraftforge.net/forum/index.php/topic,1204.0.html

 

If you use the method addRenderer(...), I saw that there is something other for that now. Maybe try this:

RenderingRegistry.instance().registerEntityRenderingHandler(YourEntity.class, new YourEntityRender(new CSM_YourEntityModel(...)));

 

Use that like map.put(...) from the addRenderer in your load method and outcomment your whole addRenderer method. Maybe then it'll work.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
  On 8/13/2012 at 5:28 PM, SanAndreasP said:

  Quote

Oh derp, anyway it had to be ModLoader.getMinecraftInstance().effectRenderer.addEffect but I figured it out!

 

Also, I have a couple other problems:

 

1. My Blocks and Items names does not display when I hover over them

 

2. When I hold my Blocks in my hand they have the right coordinates in the texture file only that they use the texture from terrain png(when theyre just in the inventory or on the ground they have the right texture)

 

3. Where did usePortal go?

 

4. My Mobs look completely fucked up, the texture is messed up and they all use the player model

 

1. Nothing Changed, My code: LanguageRegistry.instance().addStringLocalization("FrostedDirt" + ".name", "en_US", "Frosted Dirt");

 

2. Yes I do

 

3. Hmm, Lex?

 

4. I crashed:

 

 

  Reveal hidden contents

 

 

This is weird

 

 

Posted
  On 8/13/2012 at 5:42 PM, Thor597 said:

  Quote

  Quote

Oh derp, anyway it had to be ModLoader.getMinecraftInstance().effectRenderer.addEffect but I figured it out!

 

Also, I have a couple other problems:

 

1. My Blocks and Items names does not display when I hover over them

 

2. When I hold my Blocks in my hand they have the right coordinates in the texture file only that they use the texture from terrain png(when theyre just in the inventory or on the ground they have the right texture)

 

3. Where did usePortal go?

 

4. My Mobs look completely fucked up, the texture is messed up and they all use the player model

 

1. Nothing Changed, My code: LanguageRegistry.instance().addStringLocalization("FrostedDirt" + ".name", "en_US", "Frosted Dirt");

 

2. Yes I do

 

3. Hmm, Lex?

 

4. I crashed:

 

 

  Reveal hidden contents

 

 

This is weird

 

 

for 1.

this: "FrostedDirt" + ".name"

has to be this: "frostedDirt" + ".name"

 

for 3.

I dunno how it works on Blocks, I used that only for my items so far and that works.

 

for 4.

then I dunno. :/

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
  On 8/13/2012 at 5:52 PM, SanAndreasP said:

  Quote

  Quote

  Quote

Oh derp, anyway it had to be ModLoader.getMinecraftInstance().effectRenderer.addEffect but I figured it out!

 

Also, I have a couple other problems:

 

1. My Blocks and Items names does not display when I hover over them

 

2. When I hold my Blocks in my hand they have the right coordinates in the texture file only that they use the texture from terrain png(when theyre just in the inventory or on the ground they have the right texture)

 

3. Where did usePortal go?

 

4. My Mobs look completely fucked up, the texture is messed up and they all use the player model

 

1. Nothing Changed, My code: LanguageRegistry.instance().addStringLocalization("FrostedDirt" + ".name", "en_US", "Frosted Dirt");

 

2. Yes I do

 

3. Hmm, Lex?

 

4. I crashed:

 

 

  Reveal hidden contents

 

 

This is weird

 

 

for 1.

this: "FrostedDirt" + ".name"

has to be this: "frostedDirt" + ".name"

 

for 3.

I dunno how it works on Blocks, I used that only for my items so far and that works.

 

for 4.

then I dunno. :/

 

How can it be a lowercase f when the Block is called FrostedDirt?

Posted
  On 8/13/2012 at 6:00 PM, Thor597 said:

  Quote

  Quote

  Quote

  Quote

Oh derp, anyway it had to be ModLoader.getMinecraftInstance().effectRenderer.addEffect but I figured it out!

 

Also, I have a couple other problems:

 

1. My Blocks and Items names does not display when I hover over them

 

2. When I hold my Blocks in my hand they have the right coordinates in the texture file only that they use the texture from terrain png(when theyre just in the inventory or on the ground they have the right texture)

 

3. Where did usePortal go?

 

4. My Mobs look completely fucked up, the texture is messed up and they all use the player model

 

1. Nothing Changed, My code: LanguageRegistry.instance().addStringLocalization("FrostedDirt" + ".name", "en_US", "Frosted Dirt");

 

2. Yes I do

 

3. Hmm, Lex?

 

4. I crashed:

 

 

  Reveal hidden contents

 

 

This is weird

 

 

for 1.

this: "FrostedDirt" + ".name"

has to be this: "frostedDirt" + ".name"

 

for 3.

I dunno how it works on Blocks, I used that only for my items so far and that works.

 

for 4.

then I dunno. :/

 

How can it be a lowercase f when the Block is called FrostedDirt?

 

The first initial has to be lower case. If you set the block's name like this: block.setBlockName("FrostedDirt") then you have to do this for that method, too (like this: block.setBlockName("frostedDirt")

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

You have to rewrite a lot of the things you're doing.

Directly accessing effect renderer from common code is bad, as you wont have access to it on the server

Same with the old Minecraft.usePortal

you'll have to sue the server's version.

A lot of your stuff needs to be cleaned

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted
  On 8/13/2012 at 8:33 PM, LexManos said:

You have to rewrite a lot of the things you're doing.

Directly accessing effect renderer from common code is bad, as you wont have access to it on the server

Same with the old Minecraft.usePortal

you'll have to sue the server's version.

A lot of your stuff needs to be cleaned

 

I'll get to working out my messy code then now!

 

I've searched my workspace for the usePortal (Client and Server) and its no longer there, has it been replaced with another one? or is it a completely new thing?

 

 

Posted

Oh yeah, the camelCase frostedDirt thing didnt make a difference:

 

public static Block frostedDirt;

 

public mod_ArcticCraft()

{

 

            {

try {

config.load();

} catch (Exception g) {

}

 

                        this.frostedDirt = (new AC_BlockFrostDirt(initIntProp(config, "frostDirt", config.CATEGORY_BLOCK, 223), 3)).setHardness(0.5F).setBlockName("frostedDirt").setStepSound(Block.soundGravelFootstep).setCreativeTab(CreativeTabs.tabBlock);

 

 

                                    LanguageRegistry.instance().addStringLocalization("frostedDirt" + ".name", "en_US", "Frosted Dirt");

 

 

          }

}

                 

 

AC_BlockFrostDirt:

 

package net.minecraft.src;

 

import java.util.ArrayList;

import java.util.List;

import java.util.Random;

 

public class AC_BlockFrostDirt extends Block {

protected AC_BlockFrostDirt(int i, int j) {

super(i, j, Material.ground);

}

 

// You declare the block materials in here and what it drops because where using forge

 

public int idDropped(int i, Random rand, int j)

{

return mod_ArcticCraft.frostedDirt.blockID;

}

 

public String getVersion()

{

return "v1.0";

}

   

    public String getTextureFile() {

return "/ArcticCraft/ACBlocks.png";

}

}

 

 

I still get the weird texture bug when its in my hand and I still dont see a name when hovering over it

Posted
  On 8/14/2012 at 5:21 PM, Thor597 said:

 

  Reveal hidden contents

 

 

You need to use the @Mod() annotation go here for a tutorial on how to implement it

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

    • My parents made a big decision a few years ago they sold our longtime family home in Manhattan New York with the dream of starting a new chapter After decades in the city they wanted a quieter lifestyle with more space and the chance to build their dream home from the ground up They had their eyes on the neighboring state of Pennsylvania which offered more affordable land and a slower pace of life After selling the Manhattan home and an adjacent plot of land they were financially ready to make the move After some searching they found what looked like the perfect opportunity a piece of land listed for sale in the Poconos region of Pennsylvania The area was known for its scenic beauty peaceful environment and growing development potential The seller painted a convincing picture of rising property values and urged them to act quickly to secure a prime spot The deal seemed urgent but my parents were excited and eager to get started The seller requested a $30,000 USD down payment to reserve the plot with the catch being that the payment needed to be made in cryptocurrency Bitcoin specifically While it raised a few red flags the seller provided what looked like valid documents including supposed title information and a property map Trusting the process my parents sent the payment Almost immediately after that communication started to break down The phone numbers were suddenly unreachable emails bounced and the website they had been using disappeared Worse still when they tried to verify the land records with the local county office they learned there was no such property under the seller’s name It was a total scam The emotional and financial hit was crushing They had put down a large part of their life savings and it felt like everything had come crashing down Thankfully hope returned when my dad happened to run into an old college friend while visiting a mutual acquaintance in New Jersey During their catch-up my dad shared what had happened and that friend immediately recommended Byte phantom cyber services a cyber-forensics and scam recovery team that specialized in crypto fraud At first my parents were skeptical after all it felt like they had already been fooled once But they decided to reach out The team at Byte phantom cyber services was prompt professional and surprisingly knowledgeable They launched an investigation tracked the blockchain transactions and followed the digital trail using specialized tools Over the following weeks they kept my parents updated and eventually succeeded in recovering the entire $30,000 that had been scammed It was an incredible relief Not only did they recover the lost funds but they also learned valuable lessons about digital security and the importance of verifying everything especially when it comes to unconventional payment methods With their money back they resumed their search this time more carefully and eventually found a legitimate piece of land in the Lehigh Valley area of Pennsylvania where they are now happily building their new home  
    • I didn’t even notice that side of the report, as I expected it was a bunch of client mods, thanks for the advice
    • Yea it looks like it. Looks like I have to wait for a fix for that. Just don't level up fishermen ahaha.
    • Also make a test without all mods related to worldgeneration and the xaero mods - like betterdungeons, integrated-api etc
    • Make a test without all Create addons: - create_buffers__beams_overhauled 1.0.0 - create_central_kitchen 1.4.1 - create_confectionery 1.1.0 - create_copper_and_zinc 1.6.0 - create_crush_everything 1.0.2 - create_dd 0.1b.Release-Early-Dev - create_easy_structures 0.2 - create_enchantment_industry 1.3.2-for-create-6.0.4 - create_questing 1.0.0 - create_sa 2.1.0 - createbb 3.1.1 - createcasing 1.7.1-fix2 - createdeco 2.0.3-1.20.1-forge One or more of these may not compatible with Create 6
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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