larsgerrits
Members-
Posts
3462 -
Joined
-
Last visited
-
Days Won
17
Everything posted by larsgerrits
-
[1.7.10] SOLVED Get display name of a placed block?
larsgerrits replied to Muramasa's topic in Modder Support
There are a few exceptions with Minecraft blocks, like blocks and flower pots. Those blocks are places by a different Item then the ItemBlock corresponding to the Block. To account for this, you have to do things a little bit different. You need to get an ItemStack instance using Block#getPickBlock(...) . Then you can get the display name using ItemStack#getDisplayName() . -
[SOLVED][1.8]Setting the harvest level in the constructer
larsgerrits replied to 2ShotKaos's topic in Modder Support
No, I meant it like this: marble = new Block().whatevermethodsyouwant(); marble.setHarvestLevel(parameters); -
The error is pretty obvious: java.lang.ClassCastException: com.google.common.collect.HashMultimap cannot be cast to Com.gun.gun.ItemGun at Com.gun.Packet.ReloadGunPacket$Handler.onMessage(ReloadGunPacket.java:77) ~[ReloadGunPacket$Handler.class:?]
-
[SOLVED][1.8]Setting the harvest level in the constructer
larsgerrits replied to 2ShotKaos's topic in Modder Support
You can't include setHarvestLevel in your 'chain', as that method doesn't have a Block as it's return type. You have to call setHarvestLevel after your block instantiation. -
ConcurrentModificationException When generating new chunks
larsgerrits replied to mrsal511's topic in Support & Bug Reports
One of your mods is adding entities to the world from the wrong thread. It is very hard to track down the mod that caused the error, so the best you can do is remove mods until the error stops. -
[1.8]Having Trouble Getting a Mob to Spawn In a Village
larsgerrits replied to TheExceptionist's topic in Modder Support
PopulateChunkEvent is a Forge event. You have to register it to the MinecraftForge.EVENT_BUS , but you are registering it to the FML event bus (FMLCommonHandler.instance().bus()). -
Whenever you get an error, post it. Without it we can't do anything usefull to help you.
-
[1.7.10] Minable Generator Crashes the game.
larsgerrits replied to BlazeGameR's topic in Modder Support
I see a lot of things wrong with the way you coded your mod: - You only need 1 IWorldGenerator to generate all your ores. - if (this.nether == true) Why do people do this? This works exactly the same as if(this.nether) , since the nether variable is of type boolean. - As diesieben07 said, why are the fields in your generator class static? Do you even know what static means? This explains a lot of your problems (only tungsten generating, but everywhere). - In allof your asserts, you used the wrong logical operators: < instead of >, and vice versa. The first asserts is basically: if maxY is greater than minY, say "maxY is lower than minY". - You are generating with the wrong X and Z variables in the overworld. This is what you get when you have horrible names for variables. Overall, I'm beginning to question your Java knowledge. If you don't know Java, and you are trying to learn it via Minecraft modding, I strongly advice against it. Learning Java and modding seperately will take way less time. -
There are 3 ways of rendering a block: the built-in block renderer, an ISimpleBlockRenderingHandler or using a TileEntitySpecialRenderer . Most blocks use the built-in block rendering. This compiles into a display list and only changes with block updates. It renders a chunk at a time. An ISimpleBlockRenderingHandler (ISBRH for short) is a way of providing custom vertices for the block, instead of the default cube vertices of the built-in renderer This allows . This also compiles into a display list and only changes with block updates. Just like the built-in renderer, it renders a chunk at a time. A TileEntitySpecialRenderer (TESR for short) is a bit different. It is a way of rendering custom models, made by Techne, Tabula or other modeling software. This also allows you to render different model formats (Wavefront (.obj) for example). A TESR is rendered every frame, but this makes it more resource intensive than a ISBRH. A TESR also allows animations in your model, which is not possible with a ISBRH. There are plenty of tutorials for both the ISBRH and TESR, and it's up to you to decide which you want to use. For simple models with only a few cubes, like a cauldron, an ISBRH is better. If you have more complex models, a TESR is better.
-
Who to give credit and "Domain Knowledge"
larsgerrits replied to Vega Alpha's topic in Modder Support
To be clear, FML and Forge aren't seperate projects. They used to be, but about 5 months ago they decided to merge them as nobody used FML or Forge alone. -
We are not going to download a random file from the internet. Host your code on GitHub, or share it with gists or pastebins. Also, punctuation please...
-
The assets folder doesn't exist by default, so you have to make to yourself.
-
It seems like you just answered your own question...
-
1) As said before, you have 2 methods with FMLInitialization as it's parameter. 2) Don't make the @EventHandler methods static. 3) That code in your ClientProxy... Why? That's just all... wrong... How could you even manage to do that? It just doesn't make any sens at all...
-
[SOLVED] Problem with world.setBlockToAir
larsgerrits replied to SamboyCoding's topic in Modder Support
Then there wouldn't be any log messages, since the method checks world.isRemote == false. Totally missed that... I should go to bed to rest, as I won't be of much help when I'm tired like this... -
[SOLVED] Problem with world.setBlockToAir
larsgerrits replied to SamboyCoding's topic in Modder Support
From where are you calling the clearArea method? It seems like you are calling the method on the client-side only. -
We already told you how to do it without custom spawn eggs.
-
1.7.10 Trouble getting custom textures to work [Solved]
larsgerrits replied to MagnusCaligo's topic in Modder Support
You don't put resources (textures) in src/main/java, but src/main/resources (duh...). -
And why do you think you have to override those? There's probably another way of doing that what you wanted to do. So:
-
Working with custom tools with special abilities
larsgerrits replied to BHGgaming's topic in Modder Support
For the third time: heldItem == new ItemStack(GemItems.redPoweredPick) does not work. You have to directly compare the [ttItem[/code], not the ItemStack . -
java.lang.NullPointerException: Rendering screen at com.camerpon900.realauto2.gui.GuiEnergyCube.drawGuiContainerBackgroundLayer(GuiEnergyCube.java:29) On line 29, there is this code: int p = this.tileEntityEnergyCube.getPowerScaled(42); The only thing that can be null is tileEntityEnergyCube . It your constructor you set that variable, but it stays null. Why? because you call the GuiEnergyCube constructor with tileEntity being null. So there is an issue with the way you initialize your GuiEnergyCube , most likely in your IGuiHandler .
-
[Solved] [1.7.10] World.scheduleBlockUpdate() isn't working?
larsgerrits replied to IceMetalPunk's topic in Modder Support
Two things are different: 1) You are now only doing things on the server side 2) You added a call to World#notifyBlocksOfNeighborChange , which is probably what made it work.