JavaMan7
-
Posts
18 -
Joined
-
Last visited
-
Days Won
1
Posts posted by JavaMan7
-
-
16 hours ago, FrostBytes said:
That's not how you build JavaDocs in Eclipse, at least from the time I used the program.
They are already built but the paths to them are not thats what the eclipse comand dose 1.13.2+ already has the eclipse plugin buit in. This is the best way to do this and it going to be done this way in the future. And like i said befor forge docs are here the ones in eclipse are just qick references.
- 1
-
this is the error im getting
Unable to resolve texture due to upward reference: #all in minecraft:block/cube_all
{ "parent": "block/cube_all", "textures": { "": "subterranean_creatures_mod:blocks/simie_cobblestone" } }
so whats the new way of doing this in 1.13.2
-
This is more what your looking for LINK . it teaches you structure. the docs in eclipse are not helpful unless you know the basics first.
and this will give you java docs in eclipse.
1. add this line apply plugin: 'eclipse' to build.gradle just under apply plugin: 'net.minecraftforge.gradle'
2. run gradlew eclipse
3.if eclipse is open restart it
NOTE: you must build first.
-
6 minutes ago, Cadiboo said:
This solution won't work for anything except windows, and doesn't fix the underlying problem. Setting your JAVA_HOME variable is the right way to go
I had a problem like this and could not set the system variable but this works well. most people are on Windows and I think this would work on other operating systems if you change it to the right path for that system.
-
add this to your build.gradle BUT change the path to your jdk.
compileJava.options.fork = true compileJava.options.forkOptions.executable = "C:\\Program Files\\Java\\jdk1.8.0_201\\bin\\javac.exe"
just after this line
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
-
if your making a server you should try the sponge api. there is a text api that would let you do this. this is the LINK. there is a ton of other plugin to use for server management too. there is an example using sponge api .
public class TextManager implements MessageChannel { @Override public Optional<Text> transformMessage(Object sender, MessageReceiver recipient, Text original, ChatType type) { Text text = original; if(text.toPlainSingle().contains("POOP")) { text = Text.of(text.toPlainSingle().replace("POOP", "P@#$")); } text = Text.of(); return Optional.of(text); } @Override public Collection<MessageReceiver> getMembers() { return Collections.emptyList(); } }
-
what do you mean could you give me an example?
like this?
{ "variants": { "": { "model": "subterranean_creatures_mod:simie_cobblestone" } } }
-
so I get this line of code in the terminal
Exception loading blockstate definition: 'subterranean_creatures_mod:blockstates/simie_cobblestone.json' in resourcepack: 'main': Neither 'variants' nor 'multipart' found
{ "variants": { "normal": { "model": "subterranean_creatures_mod:simie_cobblestone" } } }
cant see what the problem is. what am i doing wrong.
-
2 hours ago, Blue_Atlas said:
I'm sorry but I am still confused. What steps of setup do I need to do on my laptop if I already have eclipse installed but don't have anything else there that I need before I can copy my directory over and have it run properly?
1. Transfer the work dir to your laptop.
2. add apply plugin: 'eclipse' to your build.gradle file just below apply plugin: 'net.minecraftforge.gradle.forge'(note 1.12.2 only)
2. on the laptop you need to rebuild the eclipes paths.
gradlew cleanEclipse and then gradlew eclipse
3.Make the gradlew genEclipseRuns you may need to delete the old server and client.launch before ruining this. (note this only works on the 1.13.2 if your on 1.12.2 you need to use gradlew runClient command to start your game )
this will let your laptop skip the heavy lifting of the build.
-
-
Dose any one know the new process for doing this.
-
I have tried many different build of forge but get the same error i'm on Windows 10 eclipse version 2018 -12
how do i fix this
console out put
[22:32:22] [main/INFO]: Extra: [] [22:32:22] [main/INFO]: Running with arguments: [--tweakClass, net.minecraftforge.fml.common.launcher.FMLServerTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [22:32:22] [main/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker [22:32:22] [main/INFO]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker [22:32:22] [main/INFO]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [22:32:22] [main/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker 2019-02-15 22:32:22,782 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2019-02-15 22:32:22,783 main ERROR Error processing element TerminalConsole ([Appenders: null]): CLASS_NOT_FOUND 2019-02-15 22:32:22,783 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2019-02-15 22:32:22,798 main ERROR Unable to locate appender "Console" for logger config "root" 2019-02-15 22:32:23,383 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2019-02-15 22:32:23,383 main ERROR Error processing element TerminalConsole ([Appenders: null]): CLASS_NOT_FOUND 2019-02-15 22:32:23,383 main ERROR Error processing element LoggerNamePatternSelector ([PatternLayout: null]): CLASS_NOT_FOUND 2019-02-15 22:32:23,388 main ERROR Unable to locate appender "Console" for logger config "root"
-
had same problem this should work but it updates randomly so the time can't be controlled well.
this will just change the block at random update
package com.studiomaker.poweredelements2.blocks; import java.util.Random; import com.studiomaker.poweredelements2.init.ModBlocks; import com.studiomaker.poweredelements2.util.IHasModel; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.world.World; public class FrozenDirt extends BlockBase implements IHasModel { public FrozenDirt(String name, Material material) { super(name, material); setSoundType(SoundType.GLASS); setHardness(1.0F); setResistance(1F); setTickRandomly(true); } @Override public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) { worldIn.setBlockState(pos, Blocks.AIR.getDefaultState());//chage this to the block you want } }
-
I want to make a block despawn after a time. but the update is called randomly so i can not control the time for the block to despawn. i tried scheduleUpdate method but that dose not seem to work.
package com.javaman.subterranean.blocks; import java.util.Random; import org.w3c.dom.css.ElementCSSInlineStyle; import com.javaman.subterranean.SubterraneanCreaturesMod; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.util.DamageSource; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class LapisCobblestone extends Block { public long timelast = 0; public long time = 0; public boolean l = true; public LapisCobblestone() { super(Material.ROCK); this.setUnlocalizedName("simie_cobblestone"); this.setRegistryName(SubterraneanCreaturesMod.MODID+":"+"simie_cobblestone"); this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); this.setTickRandomly(true); // this.setTickRandomly(true); } @Override public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) { worldIn.scheduleUpdate(pos, this, 1); if(l) { timelast = Minecraft.getMinecraft().getSystemTime(); l=false; }else { System.out.println("hi"); time =Minecraft.getMinecraft().getSystemTime(); if(timelast - time >= 5000) { worldIn.setBlockState(pos, Blocks.AIR.getDefaultState()); l=true; } // worldIn.setBlockState(pos, Blocks.AIR.getDefaultState()); } } @Override public void onEntityWalk(World worldIn, BlockPos pos, Entity entityIn) { if (!entityIn.isImmuneToFire() && entityIn instanceof EntityLivingBase && !EnchantmentHelper.hasFrostWalkerEnchantment((EntityLivingBase)entityIn)) { entityIn.attackEntityFrom(DamageSource.HOT_FLOOR, 1.0F); } super.onEntityWalk(worldIn, pos, entityIn); } @Override public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { entityIn.motionX *= 0.4D; entityIn.motionZ *= 0.4D; } @Override public int tickRate(World worldIn) { return 10; } @Override public boolean requiresUpdates() { return true; } }
-
-
this checks which side the code is on. this answers part of your question
world.isRemote is false if server world
if (!world.isRemote) {
}
-
I am trying to make a new dimension but when I try to go there I get the error below.
this is how i register the dimension
DimensionRegister.mainRegistry() gets called here
this is where the Player.changeDimension() gets called .This works some times but only if the DimensionType that I pass into DimensionManager.registerDimension() is one of the existing enum. if i use DimensionType.register() it never works and gives me the error below
could some one tell me what im doing wrong and how to do it the right way with an example.
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_144]
at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_144]
at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:795) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:740) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:589) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
Caused by: java.lang.NullPointerException
at net.minecraft.world.Teleporter.placeInExistingPortal(Teleporter.java:136) ~[Teleporter.class:?]
at net.minecraft.world.Teleporter.placeInPortal(Teleporter.java:39) ~[Teleporter.class:?]
at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:748) ~[PlayerList.class:?]
at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:675) ~[PlayerList.class:?]
at com.javaman.subteranean.items.TransDimensionalOrb.onItemRightClick(TransDimensionalOrb.java:84) ~[TransDimensionalOrb.class:?]
at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:234) ~[ItemStack.class:?]
at net.minecraft.server.management.PlayerInteractionManager.processRightClick(PlayerInteractionManager.java:385) ~[PlayerInteractionManager.class:?]
at net.minecraft.network.NetHandlerPlayServer.processTryUseItem(NetHandlerPlayServer.java:784) ~[NetHandlerPlayServer.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:43) ~[CPacketPlayerTryUseItem.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:9) ~[CPacketPlayerTryUseItem.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_144]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_144]
at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
... 5 more
[12:42:41] [Server thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_144]
at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_144]
at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:795) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:740) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:589) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
Caused by: java.lang.NullPointerException
at net.minecraft.world.Teleporter.placeInExistingPortal(Teleporter.java:136) ~[Teleporter.class:?]
at net.minecraft.world.Teleporter.placeInPortal(Teleporter.java:36) ~[Teleporter.class:?]
at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:748) ~[PlayerList.class:?]
at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:675) ~[PlayerList.class:?]
at com.javaman.subteranean.items.TransDimensionalOrb.onItemRightClick(TransDimensionalOrb.java:84) ~[TransDimensionalOrb.class:?]
at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:234) ~[ItemStack.class:?]
at net.minecraft.server.management.PlayerInteractionManager.processRightClick(PlayerInteractionManager.java:385) ~[PlayerInteractionManager.class:?]
at net.minecraft.network.NetHandlerPlayServer.processTryUseItem(NetHandlerPlayServer.java:784) ~[NetHandlerPlayServer.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:43) ~[CPacketPlayerTryUseItem.class:?]
at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:9) ~[CPacketPlayerTryUseItem.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_144]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_144]
at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
... 5 more
Where can I find the JavaDocs for the forge API?
in Modder Support
Posted · Edited by JavaMan7
this is the minecraft source code and minecraft forge source code.
Ctrl+space list all field and methods in a class
hovering over an object will link to its class clicking on it takes you to its source code.
right click on an object and click type hierarchy
btw this is all of the types that have a registry call type
the docks are not the best. they don't tell you every thing you may need to dig this should help and i think this is what you are look for maybe?
and there is out line is on the side looks like this ?
this is a piece of code from EntityType<T> class at first I did not now how to register entitys but this gave me a start point to finger it out. this is to just get you thinking.
you now have a reference to just about every thing in terms of docs.