Jump to content

Biome is just piston heads and wool. But its set to something else.


Recommended Posts

Posted

Hello! I created a biome today, and when i went into the game this is what i saw:

 

XJocxuN.png

 

Here is my Biome gen code :

 

 

 package mod.gmod622.biome;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mod.gmod622.main.mod_ZeCraft;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;

public class BiomeGenZecraft extends BiomeGenBase
{
private WorldGenerator UnDeadworldGeneratorBigTree;
public final Material blockMaterial;
public BiomeGenZecraft(int par1)
{
super(par1);
this.blockMaterial = Material.water;
this.minHeight = 0.1F;
this.maxHeight = 0.6F;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.topBlock = ((byte)mod_ZeCraft.ZeGrass.blockID);
this.fillerBlock = ((byte)mod_ZeCraft.ZeDirt.blockID);
this.setBiomeName("ZeBiome");

/** this changes the water colour, its set to red now but ggole the java colours **/
this.waterColorMultiplier = 0xE42D17;
}
} 

 

 

Main class

 

 

 

package mod.gmod622.main;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import mod.gmod622.Provider.WorldProviderZeCraft;
import mod.gmod622.biome.BiomeGenZecraft;
import mod.gmod622.block.TestBlockClass;
import mod.gmod622.block.ZeDirtBlockClass;
import mod.gmod622.block.ZeGrassBlockClass;
import mod.gmod622.block.ZePortalBlockClass;
import mod.gmod622.block.ZePortalItemClass;
import mod.gmod622.block.ZeStoneBlockClass;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.Item;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.client.event.sound.SoundLoadEvent;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.Property;
import net.minecraftforge.event.ForgeSubscribe;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = mod_ZeCraft.modid, name = "ZeCraft", version = "0.0.0.1a")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class mod_ZeCraft
{
       public static final String modid = "ZeCraft";
       
       public static int DimID = 2;

public static final int TestBlockID = 3615;
    public static final int ZeGrassID = 3620;
    public static final int ZeDirtID = 3618;
    public static final int ZeStoneID = 3619;
    public static final int ZePortalID = 3616;
    public static final int ZePortalItemID = 3617;
    
    public static BiomeGenBase ZeBiome;

       public static Block TestBlock;
       public static Block ZeGrass;
       public static Block ZeDirt;
       public static Block ZeStone;
       public static Block ZePortal;
       public static Item ZePortalItem;
       


    	   

       

       

      
       @Init
       public void load(FMLInitializationEvent event)
       {
    	   
    	   //Block implemtation 
   		TestBlock = new TestBlockClass(TestBlockID, Material.rock).setUnlocalizedName("ZeCraft:TestBlock").setStepSound(Block.soundMetalFootstep).setHardness(0.2F).setResistance(10.0F);

   		ZeDirt = new ZeDirtBlockClass(ZeDirtID, Material.ground).setUnlocalizedName("ZeCraft:ZeDirt").setHardness(0.9F).setStepSound(Block.soundGrassFootstep);              
   		ZeGrass = new ZeGrassBlockClass(ZeGrassID, Material.grass).setUnlocalizedName("ZeCraft:ZeGrass").setHardness(0.9F).setStepSound(Block.soundGrassFootstep);              
   		ZeStone = new ZeStoneBlockClass(ZeStoneID, Material.ground).setUnlocalizedName("ZeCraft:ZeStone").setHardness(0.9F).setStepSound(Block.soundStoneFootstep);              
   		ZePortal = new ZePortalBlockClass(ZePortalID).setUnlocalizedName("ZeCraft:ZePortalBlock").setHardness(-1F).setStepSound(Block.soundGlassFootstep);   
   		
    	//Item implematation
    	ZePortalItem = new ZePortalItemClass(ZePortalItemID).setUnlocalizedName("ZeCraft:ZePortalItem");
   		
   		
   		   //Block Registry
   		
    	   GameRegistry.registerBlock(TestBlock, "Test Block");
    	   LanguageRegistry.addName(TestBlock, "Test Block");
    	   
    	   GameRegistry.registerBlock(ZeGrass, "Ze-Grass");
    	   LanguageRegistry.addName(ZeGrass, "Ze-Grass");
    	   
    	   GameRegistry.registerBlock(ZeStone, "Ze-Stone");
    	   LanguageRegistry.addName(ZeStone, "Ze-Stone");
    	   
    	   GameRegistry.registerBlock(ZeDirt, "Ze-Dirt");
    	   LanguageRegistry.addName(ZeDirt, "Ze-Dirt");
    	   
    	   GameRegistry.registerBlock(ZePortal, "Ze-Portal");
    	   LanguageRegistry.addName(ZePortal, "Ze-Portal");
    	   
    	   //Item Regirty
    	   GameRegistry.registerItem(ZePortalItem, "Ze-Portal Item");
    	   LanguageRegistry.addName(ZePortalItem, "Ze-Portal Item");
    	   
    	   
    	   //other registrys
    	   
    	   ZeBiome = new BiomeGenZecraft(DimID).setBiomeName("Ore Plains");
    	   GameRegistry.addBiome(ZeBiome);
    	   
    	   
    	   //Randoms
    	   
    	   someConfigFlag = false;
    	   
    	   //Dim
    	   /**Register WorldProvider for Dimension **/
    	   DimensionManager.registerProviderType(DimID, WorldProviderZeCraft.class, true);
    	   DimensionManager.registerDimension(DimID, DimID);
       
       }
       
       
       
       
       @PreInit
       public void preInit(FMLPreInitializationEvent event) {
               Configuration config = new Configuration(event.getSuggestedConfigurationFile());

               config.load();

               int randomBlockID = config.getBlock("TestBlock", TestBlockID).getInt();

//               int randomItemID = config.getItem("RandomItem", 20000).getInt();

               // Since this flag is a boolean, we can read it into the variable directly from the config.
               someConfigFlag = config.get(Configuration.CATEGORY_GENERAL, "SomeConfigFlag", false).getBoolean(false);
               
               //Notice there is nothing that gets the value of this property so the expression results in a Property object.
               Property someProperty = config.get(Configuration.CATEGORY_GENERAL, "SomeConfigString", "nothing");
               
               // Here we add a comment to our new property.
               someProperty.comment = "IDK CONFIG";
               
             //  String someConfigString = someProperty.value;
               // this could also be:
               // int someInt = someProperty.getInt();
               // boolean someBoolean = someProperty.getBoolean(true);

               config.save();
       }
    	 
       
       
       
       
       
       
       //Sounds
    /*   
       @ForgeSubscribe
       public void onSound(SoundLoadEvent event)
       {
           try 
           {
               event.manager.soundPoolSounds.addSound("");            
           
           } 
           catch (Exception e)
           {
               System.err.println("Failed to register one or more sounds.");
           }
       }
       
       */
       
       //--

       
       public static boolean someConfigFlag;
}

 

 

 

if you need anything else just tell me :)

Not new to java >> New to modding.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • ight so i was able to get rid of the error and create a world, but all of my item (blocks that would look like dropped items, basically entities) and entity textures are black. I don't have optifine, but I do have oculus, rubidium, and embeddium. I tried removing oculus and rubidium but no changes. Lmk if u find anything. Debug: https://drive.google.com/drive/folders/1IajSGdwiAKEd8tsayUXiAI2BT3buFh30?usp=sharing
    • You can check mod compatibility remove new mods and test them one by one.
    • @Tsuk1 Also, new note, you can use blockbench to make the custom item model for when it is not on the head.   EDIT: Funny story, I am making a mod similar to yours! Mine is called NorseMC.
    • @Nood_dev Could you send a screenshot of your weapon code? Here is the one I made (for a dagger): The specific UUID does not matter, just that it is the same every time, which is why UUID#randomUUID does not work public class DaggerItem extends TieredItem implements Vanishable { protected static final double REACH_MODIFIER = -1.5D; protected final Multimap<Attribute, AttributeModifier> defaultModifiers; protected final UUID BASE_ATTACK_REACH_UUID = UUID.fromString("6fe75b5c-9d1b-4e83-9eea-a1d5a94e8dd5") public DaggerItem(Tier pTier, int pAttackDamageModifier, float pAttackSpeedModifier, Properties pProperties) { super(pTier, pAttackDamageModifier, pAttackSpeedModifier, pProperties); this.attackDamage = (float) pAttackDamageModifier + pTier.getAttackDamageBonus(); ImmutableMultimap.Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder(); builder.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Weapon modifier", this.attackDamage, AttributeModifier.Operation.ADDITION)); builder.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID, "Weapon modifier", pAttackSpeedModifier, AttributeModifier.Operation.ADDITION)); // THE ONE YOU WANT: builder.put(ForgeMod.ENTITY_REACH.get(), new AttributeModifier(BASE_ATTACK_REACH_UUID, "Weapon modifier", REACH_MODIFIER, AttributeModifier.Operation.ADDITION)); this.defaultModifiers = builder.build(); } @Override public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot pEquipmentSlot) { return pEquipmentSlot == EquipmentSlot.MAINHAND ? this.defaultModifiers : super.getDefaultAttributeModifiers(pEquipmentSlot); } }
    • https://images.app.goo.gl/1PxFKdxByTgkxvSu6
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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