Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FantaLaTone

Members
  • Joined

  • Last visited

Everything posted by FantaLaTone

  1. Are you sure about this cause it messed so many things now
  2. I got new problems private static RegistryObject<T extends AbstractContainerMenu> MenuType<T> registerMenu(String registryname, IContainerFactory<?> containerFactory) { return REGISTRY.register(registryname, () -> new MenuType<T>(containerFactory)); } this is the error message i get: D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<T extends AbstractContainerMenu> MenuType<T> registerMenu(String registryname, IContainerFactory<?> containerFactory) {
  3. D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: <identifier> expected private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^ D:\Fiverr Tasks\adree411\src\main\java\com\masterquentus\hexcraft\world\HexcraftMenus.java:37: error: invalid method declaration; return type required private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { ^
  4. I changed the some of codes and errors has changed but I still get errors new code: private static final DeferredRegister<Container> REGISTRY = DeferredRegister.create(ForgeRegistries.CONTAINERS, Hexcraft.MOD_ID); public static final MenuType<Crate_WhiteOakGUIMenu> WHITE_OAK_CRATE_GUI = registerMenu("white_oak_crate_gui", (id, inv, extraData) -> new Crate_WhiteOakGUIMenu(id, inv, extraData)); public static final MenuType<Crate_HellbarkGUIMenu> HELLBARK_CRATE_GUI = registerMenu("hellbark_crate_gui", (id, inv, extraData) -> new Crate_HellbarkGUIMenu(id, inv, extraData)); public static final MenuType<Crate_BloodOakGUIMenu> BLOOD_OAK_CRATE_GUI = registerMenu("blood_oak_crate_gui", (id, inv, extraData) -> new Crate_BloodOakGUIMenu(id, inv, extraData)); // public static final MenuType<EbonyCrateGUIMenu> EBONY_CRATE_GUI = register("ebony_crate_gui", // (id, inv, extraData) -> new EbonyCrateGUIMenu(id, inv, extraData)); private static RegistryObject<<T extends AbstractContainerMenu> MenuType<T>> registerMenu(String registryname, IContainerFactory<T> containerFactory) { return REGISTRY.register(registryname, () -> new MenuType<T>(containerFactory)); } public static void register(IEventBus eventBus) { event.register(eventBus); }
  5. I am using DeferredRegister right now but I've made some changes but it still don't work can you just tell me replace this with this? I tried everything on documents but no help
  6. Hello, I am currently porting my 1.18 mod into 1.19 but while porting ModContainers I got some errors and I tried everything but I couldn't solve those problems. private static final DeferredRegister REGISTRY = DeferredRegister.create(ForgeRegistries.CONTAINERS, Hexcraft.MOD_ID); public static final MenuType<Crate_WhiteOakGUIMenu> WHITE_OAK_CRATE_GUI = register("white_oak_crate_gui", (id, inv, extraData) -> new Crate_WhiteOakGUIMenu(id, inv, extraData)); public static final MenuType<Crate_HellbarkGUIMenu> HELLBARK_CRATE_GUI = register("hellbark_crate_gui", (id, inv, extraData) -> new Crate_HellbarkGUIMenu(id, inv, extraData)); public static final MenuType<Crate_BloodOakGUIMenu> BLOOD_OAK_CRATE_GUI = register("blood_oak_crate_gui", (id, inv, extraData) -> new Crate_BloodOakGUIMenu(id, inv, extraData)); // public static final MenuType<EbonyCrateGUIMenu> EBONY_CRATE_GUI = register("ebony_crate_gui", // (id, inv, extraData) -> new EbonyCrateGUIMenu(id, inv, extraData)); private static <T extends AbstractContainerMenu> MenuType<T> register(String registryname, IContainerFactory<T> containerFactory) { MenuType<T> menuType = new MenuType<T>(containerFactory); menuType.setRegistryName(registryname); // NO SET REGISTRY NAME REGISTRY.register(menuType); // NO REGISTER return menuType; } @SubscribeEvent public static void registerContainers(RegisterEvent event) { event.getRegistry().registerAll(REGISTRY.toArray(new MenuType[0])); // I DON'T HAVE ANY IDEA }
  7. Hello, I have a custom bow class with regular bow's codes. I want to add a mechanic that when you release the bow, bow will shoot sonic booms instead of arrows. I looked into Warden's and sonic boom's class but I couldn't figure out something. I think sonic booms are just behaviours but how I can implement a behaviour into a bow?
  8. Hello, I have an entity type that extends TamableAnimal. I want check for collision detection for the same type of entities. I couldn't find any Override for it. How I can detect collisions?
  9. I used a cheaper version. I am just removing all goals and adding goals I wanted later. Is this can be a problem?
  10. Hello I have a mob with simple AI goals. I want to change mob's behaviour depend on users commands. How I can do that?
  11. I solved the problem by just rearrengin if statements order if (item == ModItems.GRIFFIN_GENDER_TOME.get()) { if (world.isClientSide) { player.sendMessage(new TextComponent("") .append(this.getGender() == 0 ? "§bBoy" : "§dGirl") , player.getUUID()); } return InteractionResult.SUCCESS; }
  12. What should I return to prevent other codes to processing?
  13. Hello I have an entity with mobInteraction event. When right clicked it with a specific item mob tells player to mob's gender but when I right clicked with item it tells mob's gender and also process other interactions how I can return after tells player mob's gender? Here's my code : @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); Item item = itemstack.getItem(); Level world = player.level; if (world.isClientSide) { if (item == ModItems.GRIFFIN_GENDER_TOME.get()) { player.sendMessage(new TextComponent("") .append(this.getGender() == 0 ? "§bBoy" : "§dGirl") , player.getUUID()); return InteractionResult.SUCCESS; // RETURN AFTER THIS BUT IT'S NOT WORKING } } if (item == Items.PORKCHOP || item == Items.BEEF && !isTame()) { if (this.level.isClientSide) { return InteractionResult.CONSUME; } else { if (!player.getAbilities().instabuild) { itemstack.shrink(1); } if (!ForgeEventFactory.onAnimalTame(this, player) && this.random.nextInt(8) == 0) { if (!this.level.isClientSide) { super.tame(player); this.navigation.recomputePath(); this.setTarget(null); this.level.broadcastEntityEvent(this, (byte)7); setSitting(true); } } return InteractionResult.SUCCESS; } } if(isTame() && !this.level.isClientSide && hand == InteractionHand.MAIN_HAND) { setSitting(!isSitting()); return InteractionResult.SUCCESS; } if (itemstack.getItem() == Items.PORKCHOP || itemstack.getItem() == Items.BEEF) { return InteractionResult.PASS; } return super.mobInteract(player, hand); }
  14. thanks I will try using AbstractHorse first
  15. Hi, I have an entity that extends TamableAnimal and I want it to be rideable how I can do that?
  16. I am getting the same error everytime I tried to run client after I changed my gradle Error : Unable to make field private static final java.util.Map java.lang.ProcessEnvironment.theCaseInsensitiveEnvironment accessible: module java.base does not "opens java.lang" to unnamed module @48140564 build.gradle : buildscript { repositories { maven { url = 'https://maven.minecraftforge.net/' } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'modid' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) repositories { maven { url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' } } minecraft { mappings channel: 'snapshot', version: '20200514-1.15.1' runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' mods { examplemod { source sourceSets.main } } } server { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' mods { examplemod { source sourceSets.main } } } data { workingDirectory project.file('run') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/') mods { examplemod { source sourceSets.main } } } } } dependencies { minecraft 'net.minecraftforge:forge:1.15.2-31.2.57' compile fg.deobf('software.bernie.geckolib:geckolib-forge-1.15.2:3.0.46') } jar { manifest { attributes([ "Specification-Title": "examplemod", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } }
  17. I am making a mod using Forge for Minecraft 1.15.2. I made a simple mob so far. Now I want to add a bossbar to it but I don't know how to do it. Also I couldn't find any helpful topic or video about bossbars. Any advice or help? Here's my current code : package com.fantalatone.buggytheclown.entities; import net.minecraft.entity.AgeableEntity; import net.minecraft.entity.EntityType; import net.minecraft.entity.MobEntity; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeMap; import net.minecraft.entity.ai.attributes.AttributeMap; import net.minecraft.entity.ai.goal.*; import net.minecraft.entity.effect.LightningBoltEntity; import net.minecraft.entity.monster.IMob; import net.minecraft.entity.monster.MonsterEntity; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class Buggy extends MonsterEntity implements IMob { private double health = 0.0d; public Buggy(EntityType<? extends MonsterEntity> type, World worldIn) { super(type, worldIn); } @Override protected void registerAttributes() { super.registerAttributes(); this.getAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(120D); this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5D); this.getAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(0.2D); this.getAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(8D); } @Override protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(0, new SwimGoal(this)); this.goalSelector.addGoal(1, new PanicGoal(this, 1D)); this.goalSelector.addGoal(2, new LookRandomlyGoal(this)); this.goalSelector.addGoal(1, new WaterAvoidingRandomWalkingGoal(this, 1D)); } @Override protected void updateAITasks() { super.updateAITasks(); } @Override public void livingTick() { super.livingTick(); if (!this.world.isRemote) { health = this.getHealth(); } } @Override public void onStruckByLightning(LightningBoltEntity lightningBolt) { this.setGlowing(true); } }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.