Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

scrouthtv

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About scrouthtv

  • Rank
    Tree Puncher

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Someone on discord told me to overwrite the `Tree` class: ``` public class DynamicTree extends Tree { final ResourceLocation configuredFeatureId; private ConfiguredFeature<BaseTreeFeatureConfig,?> treeFeature; public DynamicTree(ResourceLocation configuredFeatureId) { this.configuredFeatureId = configuredFeatureId; } @Nullable @Override protected ConfiguredFeature<BaseTreeFeatureConfig, ?> getTreeFeature(Random randomIn, boolean largeHive) { return treeFeature; } @Override @SuppressWa
  2. Appearantly, I can inject the json tree into a java field: https://mcforge.readthedocs.io/en/1.16.x/concepts/registries/#using-objectholder However, this is a `Feature<BaseTreeConfig>`, but I need a `ConfiguredFeature<BaseTreeConfig, ?>` instead. How do I get the other one?
  3. Hello, in older Forge versions, I created a tree using my own TreeGrower: public static ConfiguredFeature<BaseTreeFeatureConfig, ?> tree_rubber = Feature.TREE.configured( new BaseTreeFeatureConfig.Builder( new SimpleBlockStateProvider(ModBlocks.rubber_log.get().defaultBlockState()), new SimpleBlockStateProvider(ModBlocks.rubber_leaves.get().defaultBlockState()), new BlobFoliagePlacer( /* radius: */ FeatureSpread.of( 2, //base 0 //spread ), /* offset: */ FeatureSpread.of( 0, //base 0 //spread ), /* height: */ 3 ), new StraightTrunkPlace
  4. I changed nothing again, but it seems to work for now. Will report back if it breaks again.
  5. Nope, I get a similar error: (sorry for quote tag, I can't seem to add a code tag)
  6. Hello, After working on my mod for some time, I can't compile it anymore: > Task :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Could not resolve all files for configuration ':compileClasspath'. > Could not find net.minecraftforge:forge:1.16.5-36.1.0_mapped_official_1.16.5. Searched in the following locations: - https://maven.minecraftforge.net/net/minecraftforge/forge/1.16.5-36.1.0_mapped_official_1.16.5/forge-1.16.5-36.1.0_mapped_official_1.16.5.module - https://maven.minecr
  7. Here is an issue I have. I have a variable in my environment which contains utf8 characters (LF_ICONS). Whenever I try to run ./gradlew rC, it crashes: To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.10.3/userguide/gradle_daemon.html. The message received from the daemon indicates that the daemon has disappeared. Build request sent: Build{id=e0ace8f4-7f8b-47ab-a7d4-c49371fb8341, currentDir=/data/ModProgramming/forge16/forge-1.16.4-35.1.10-mdk} Attempting to read last messages from the daemon log... Daemon
  8. Heyy, in every recent version of Forge I've looked at, the #hashCode() method for BlockPos is overwritten in Vec3i as follows: public int hashCode() { return (this.getY() + this.getZ() * 31) * 31 + this.getX(); } (Credit to Mojang or the Forge Team) This would result in duplicate hashes for many positions. Technically there are only 31k positions which this could represent. Positions like (31 | 0 | 0) and (0 | 1 | 0) have the same hash code. Is this something that is just overlooked in mods today or is there a safe implementation for hashing BlockPos
  9. Okay I halfway fixed it: The method is exactly what I'm looking for. I just don't have to override, but use it. It reads the id from the nbt data and instantiates a new TileEntity with the id as ResourceLocation. net.minecraft.tileentity.TileEntity: @Nullable public static TileEntity create(World worldIn, NBTTagCompound compound) { String s = compound.getString("id"); Class <? extends TileEntity > oclass = null; oclass = (Class)REGISTRY.getObject(new ResourceLocation(s)); tileentity = oclass.newInstance(); // ... tileentity.setWorldCreate(worldIn); til
  10. Okay, so as I just found out there is a TileEntity#create(World, NBTTagCompound) static method which should do what I want. But how do override it? How do I make my TE class known to the create method?
  11. Hello. I am currently writing a mod which includes pipes. My pipes have a tree-like structure, with one root node to which all pipes directly point. The root node saves all data (which pipes are connected, which machines are adjacent, ...) To save the current state of the pipes and keep it even when reopening the world, I saved all the data to an NBT tag: @Nonnull @Override public NBTTagCompound writeToNBT(@Nonnull final NBTTagCompound compound) { if (!world.isRemote) { if (network != null) { NBTTagCompound networkTag = new NBTTagCompound(); networkTag.setTag("root",
  12. Wouldn't it make sense to declare the annotations somewhere inside Forge code?
  13. I changed my build.gradle to include compileJava { options.compilerArgs << "-Xlint" [...] } which is generally considered good practice. When trying to compile my mod using gradlew build I get this error: What is causing this?
  14. Hello. I am trying to add fluid pipes with transparency. I render my pipes in a TESR and tried to add the partly transparent fluids there too. In a forum post about transparency and depth masks (https://relativity.net.au/gaming/java/Transparency.html) I read that the solution would be to: > 1. Draw the entire scene with depth testing on for all the opaque fragments. > 2. Draw the entire scene again with the depth buffer read only. I implemented this for each TileEntity on its own, and they're working somewhat (see first attachment): How
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.