Everything posted by Choonster
-
[1.8.9] [Forge 1722] Custom ore not generating
Stick to one question per topic, don't replace the OP with a new question once you have the solution. This makes it harder for other people having the same problem to find the solution. To generate ore in non-stone blocks, use the WorldGenMinable(IBlockState, int, Predicate<IBlockState>) constructor. The Predicate determines whether the ore can replace a given IBlockState . Use BlockHelper.forBlock to create a Predicate that matches any state of the specified Block . The armour item models are in assets/minecraft/models/item with the other item models. Rendering armour on entity models is handled by LayerArmorBase and its subclasses, JSON models aren't used.
-
[1.8.9] Changing the Values of Bow Damage
1 damage takes away 1 health. Each heart is 2 health. Like I said in my previous post, the arrow's base damage is multiplied by the magnitude of its motion vector to determine the actual damage. A decently charged arrow can easily have a velocity of 1.0, which results in a motion of roughly 2.97 when hitting a fairly close target. This is also a critical, which applies bonus damage. I said in my previous post that the base damage of the arrow is 20, it's actually 2.0 (I wasn't paying enough attention). The damage is actually rounded up after being multiplied with the motion, so 2.97 * 2.0 becomes 6 damage (before the critical bonus).
-
[1.8.9] Item that acts as a furnace (container, inventory, gui..., te ?)
To do something every tick from an Item , override Item#onUpdate . To store data for an Item , either use the NBT or the new Capability system.
-
[1.8.9] Changing the Values of Bow Damage
1 damage is half a heart.
-
[Answered] Question about Tile Entites
A TileEntity is needed for two basic reasons: To store data beyond a 4-bit integer (metadata), e.g an inventory To run code every tick or every X ticks (by implementing ITickable ). This can also be done via World#scheduleUpdate / Block#updateTick , but this may not be as reliable since Minecraft will only run up to 1000 scheduled updates per tick. If you don't need either of these, you probably don't need a TileEntity .
-
[1.8.9] Changing the Values of Bow Damage
Arrows deal damage to the entity they hit in EntityArrow#onUpdate (lines 292 to 316 in Forge 1.8.9-11.15.1.1763). This is determined by multiplying the arrow's base damage with its motion (the magnitude of the vector composed of the motionX / Y / Z values) and then adding a random bonus if it's a critical hit. The base damage of the arrow is set when it's fired from the bow, this is 2.0 by default. If the bow has the Power enchantment, it adds 0.5 damage plus a further 0.5 damage for each level. Edit: The base damage is 2.0, not 20.
-
[SOLVED][1.8.9] Need Help Adding Custom Entites
So pass it an IRenderFactory instead of a Render .
-
[SOLVED][1.8.9] Need Help Adding Custom Entites
That doesn't tell me much. Which method are you talking about? What's the exact error message shown by your IDE?
-
[SOLVED][1.8.9] Need Help Adding Custom Entites
In preInit, register an IRenderFactory for your entity using an anonymous class or method reference. In this class's createRenderFor method, create and return a new instance of the appropriate Render class using the RenderManager argument.
-
[SOLVED][1.8.9] Need Help Adding Custom Entites
Because you're still creating the Render instance before the RenderManager instance has been created. IRenderFactory#createRenderFor must create a new instance of your Render class using the supplied RenderManager argument.
-
[SOLVED][1.8.9] Need Help Adding Custom Entites
To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page. Don't implement IRenderFactory in your Render class. The whole point of IRenderFactory is to delay the creation of the Render instance until the RenderManager instance is created (between the preInit and init phases). Use an anonymous class or method reference to implement IRenderFactory , like I described in my first post.
-
[SOLVED][1.8.9] Need Help Adding Custom Entites
I suspect the Render#renderManager field is null . Upload your the latest versions of your Registers , ClientProxy and RenderTerrakon classes to Gist/Pastebin with syntax highlighting and link them here.
-
[1.7.10] Why Error? (CustomEntityPlayer Getting..)
You're using the index in the AllPlayers list as the index for the worldServers array. worldServers contains the WorldServer instance for each dimension. Vanilla only has three dimensions, so once you try to create more than three CustomPlayer s you're using an invalid index. I'd suggest using for-each/enhanced for loops instead of for / while loops here.
-
[SOLVED][1.8.9] Need Help Adding Custom Entites
IRenderFactory is just an interface with a single method: createRenderFor . This method is called to create the Render instance for the entity class. If you're building against Java 6/7, just use an anonymous class to implement it. If you're building against Java 8, either use an anonymous class or create a constructor in your Render class with the same signature as IRenderFactory#createRenderFor and use a method reference to that constructor. Constructors implicitly return a new instance of their class, so you just need to match the arguments of IRenderFactory#createRenderFor : a single RenderManager argument.
-
Forge server user data manipulating
Player data is stored in the playerdata directory of the save, with each file name being the UUID of that file's player. If both computers are on the same network, you can probably use symbolic links to link either the playerdata directories or the individual player files. Otherwise you may be able to use a service like DropBox, but that will probably require using a third party application or moving the playerdata directory or the individual player files into the DropBox directory and creating symbolic links in the original location.
-
[1.8] help solving issue whith custom elevator
You can probably use ForgeGradle 2.0.2 with Forge 1.8-11.14.3.1520, just change the version number in your build.gradle. You'll probably have to update to a newer version of Forge eventually, so I'd recommend trying the latest 1.8.9 version and seeing if you can narrow down the performance issues.
-
[1.8.9] Unable to get block textures to work
That isnt the problem, the call for that IS coming from the client proxy and not my common proxy. The code you posted shows registerTexture being called in the same method as GameRegistry.registerItem . Do you have a separate registration method for the dedicated server? I realise it's not causing the issue that this thread is about, but it will cause issues if you don't separate client-only code properly.
-
[1.8.9] Overriding Vanilla Block Properties
The substitution alias system ( GameRegistry.addSubstitutionAlias ) is supposed to allow this, but I haven't had much luck with it myself.
-
[1.8.9] Unable to get block textures to work
ModelLoader and ModelResourceLocation are client-only classes. If you register models from common code instead of from your client proxy, you'll crash the dedicated server.
-
[1.8] help solving issue whith custom elevator
You're using 2.0.2 stable, which includes the fix. Once you've set up the ForgeGradle workspace and imported the project into your Eclipse workspace, the crash in the OP should no longer happen.
-
[1.8] help solving issue whith custom elevator
"ForgeGradle 2.0-SNAPSHOT" without a number after it means you're either running an old snapshot or one of the stable versions. In your build.gradle script, have you got a buildscript block followed by apply plugin: 'net.minecraftforge.gradle.forge' (the snapshot) or have you got a plugins block (the stable version)? Most recent versions of the MDK have both of these, with one commented out. If you're not sure, upload your build.gradle script to Gist and link it here. Make sure you keep the .gradle extension so it has syntax highlighting. The eclipse folder isn't generated by Gradle, it's only included in the MDK download. I don't use Eclipse myself, but from what I understand you can create a workspace yourself and import the project generated by the eclipse Gradle task. The eclipse folder shouldn't be required.
-
[1.8] help solving issue whith custom elevator
This exception is caused by ForgeGradle not rebuilding Minecraft with debug information (see this issue). There is another exception being thrown that's the initial cause of the crash, but the missing debug information causes the crash report system to crash the game (hiding the initial cause). Make sure you're running either ForgeGradle 2.0.2 or the latest 2.0 snapshot (2532819 at the time of this post), delete the ~/.gradle/caches/minecraft/net/minecraftforge/forge/<forge_version> directory (replace ~ with %USERPROFILE on Windows) and then re-run gradlew setupDecompWorkspace . This should rebuild Minecraft with debug information, revealing the initial cause of the crash.
-
[1.7.10]Dedicated server error
Your implementation of IGuiHandler#getServerGuiElement must return a Container , not a GuiScreen .
-
custom block that prevents spawning of mobs in a certain perimeter
If the World#perWorldStorage field is public in 1.6.4, your new code is correct. The field is protected in 1.8.9, but that may be a recent change.
-
[1.8.9] Data packet not being received by server?
Any IMessage sent through SimpleNetworkWrapper can be either client-to-server or server-to-client. You just need to register the message using the receiving Side rather than the sending Side . The main purpose of a Container is to sync inventory contents between the server and client, but you can also use ICrafting#sendProgressBarUpdate to send two int s to the client-side Container (this calls Container#updateProgressBar on the client side). Container doesn't provide any way of sending other types of data or client-to-server data, you need to use your own packets ( IMessage s) for that. This tutorial explains SimpleNetworkWrapper in more detail.
IPS spam blocked by CleanTalk.