Skip to content

Commit 155e4ed

Browse files
committed
Release version 1.0.0
Compared to last unreleased version: - Add Tameablility and Ownership to EntityTameableFlying - Readded Skrill to registry list - Added Deadly Nadder code (still disabled) - Fixed Sheep not dropping modded mutton - Reformatted everything to proper standards - Fixed up en_US.lang - Updated mcmod.info version
1 parent 1f7f2af commit 155e4ed

File tree

77 files changed

+3201
-2683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3201
-2683
lines changed

java/com/httymd/Config.java

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,57 @@
66
import net.minecraftforge.common.config.Configuration;
77

88
public class Config {
9-
9+
1010
private final Configuration config;
1111
private static final String STRING_PREFIX = "config.";
1212
private int startEntityID = -1;
1313
private boolean canOwnMultipleDragons = true;
1414
private boolean debugMode = false;
15+
private boolean experimentalMode = false;
1516

1617
public Config(FMLPreInitializationEvent evt) {
1718
config = new Configuration(evt.getSuggestedConfigurationFile());
18-
19+
1920
syncConfig();
2021
}
21-
22+
2223
public void syncConfig() {
23-
24-
startEntityID = config.getInt("DragonEntityID", Configuration.CATEGORY_GENERAL, startEntityID, -1, 255, "Overrides the entity ID for dragons to fix problems with manual IDs from other mods.\nSet to -1 for automatic assignment (recommended).\nWarning: wrong values may cause crashes and loss of data! Must restart Minecraft to take effect", getLocalKey("startEntityID"));
25-
canOwnMultipleDragons = config.getBoolean("MultiDragonOwnership", Configuration.CATEGORY_GENERAL, true, "Provides ability to own multiple dragons", getLocalKey("multiDragonOwnership"));
26-
debugMode = config.getBoolean("DebugMode", Configuration.CATEGORY_GENERAL, false, "Enable debug mode, developers recommended", getLocalKey("debugMode"));
27-
28-
if(config.hasChanged()) config.save();
29-
}
30-
24+
25+
startEntityID = config.getInt("DragonEntityID", Configuration.CATEGORY_GENERAL, startEntityID, -1, 255,
26+
"Overrides the entity ID for dragons to fix problems with manual IDs from other mods.\nSet to -1 for automatic assignment (recommended).\nWarning: wrong values may cause crashes and loss of data! Must restart Minecraft to take effect",
27+
getLocalKey("startEntityID"));
28+
canOwnMultipleDragons = config.getBoolean("MultiDragonOwnership", Configuration.CATEGORY_GENERAL, true,
29+
"Provides ability to own multiple dragons", getLocalKey("multiDragonOwnership"));
30+
debugMode = config.getBoolean("DebugMode", Configuration.CATEGORY_GENERAL, false,
31+
"Enable debug mode, developers recommended", getLocalKey("debugMode"));
32+
experimentalMode = config.getBoolean("ExperimentalMode", Configuration.CATEGORY_GENERAL, false,
33+
"Enable an experimental version (warning: may be less stable)", getLocalKey("experimentalMode"));
34+
35+
if (config.hasChanged())
36+
config.save();
37+
}
38+
3139
protected String getLocalKey(String ending) {
32-
return Utils.getLocalString(STRING_PREFIX+ending);
40+
return Utils.getLocalString(STRING_PREFIX + ending);
3341
}
34-
42+
3543
public Configuration getConfig() {
3644
return config;
3745
}
3846

3947
public int getStartEntityID() {
4048
return startEntityID;
4149
}
42-
50+
4351
public boolean getMultiDragonOwnership() {
4452
return canOwnMultipleDragons;
4553
}
46-
54+
4755
public boolean isDebugMode() {
4856
return debugMode;
4957
}
58+
59+
public boolean isExperimental() {
60+
return experimentalMode;
61+
}
5062
}

java/com/httymd/HTTYMDMod.java

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@
2727
import cpw.mods.fml.common.event.FMLServerStoppedEvent;
2828
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
2929

30-
@Mod(
31-
modid = HTTYMDMod.ID,
32-
name = HTTYMDMod.NAME,
33-
guiFactory = HTTYMDMod.GUIFACORY
34-
)
30+
@Mod(modid = HTTYMDMod.ID, name = HTTYMDMod.NAME, guiFactory = HTTYMDMod.GUIFACORY)
3531
public class HTTYMDMod {
3632

3733
//////////////////////////////////////////////////////
@@ -49,28 +45,24 @@ public class HTTYMDMod {
4945
@Instance(ID)
5046
public static HTTYMDMod INSTANCE;
5147

52-
@SidedProxy(
53-
modId = ID,
54-
clientSide = CLIENT_PROXY,
55-
serverSide = COMMON_PROXY
56-
)
48+
@SidedProxy(modId = ID, clientSide = CLIENT_PROXY, serverSide = COMMON_PROXY)
5749
public static CommonProxy proxy;
5850

5951
private ModMetadata metadata;
6052
private Config config;
6153
private final Logger log = LogManager.getLogger(NAME);
62-
54+
6355
private ArrayList<String> dragonNameList = new ArrayList<String>();
6456

6557
public static void registerDragonName(String name) {
6658
INSTANCE.dragonNameList.add(name);
6759
}
68-
60+
6961
@SuppressWarnings("unchecked")
7062
public static ArrayList<String> getDragonList() {
7163
return (ArrayList<String>) INSTANCE.dragonNameList.clone();
7264
}
73-
65+
7466
public static ModMetadata getMetadata() {
7567
return INSTANCE.metadata;
7668
}
@@ -82,21 +74,23 @@ public static Config getConfig() {
8274
public static Logger getLogger() {
8375
return INSTANCE.log;
8476
}
85-
77+
8678
public static CreativeTab getCreativeTab() {
8779
return CreativeTab.DRAGON_TAB;
8880
}
89-
90-
public static void registerEntity(Class<? extends Entity> entityClass, String entityName, int solidColor, int spotColor) {
81+
82+
public static void registerEntity(Class<? extends Entity> entityClass, String entityName, int solidColor,
83+
int spotColor) {
9184
EntityRegister.createEntity(entityClass, entityName, solidColor, spotColor);
9285
}
9386

9487
@EventHandler
9588
public void modPreInit(FMLPreInitializationEvent event) {
9689
config = new Config(event);
97-
metadata = event.getModMetadata();
90+
metadata = event.getModMetadata();
9891
proxy.onPreInit(event);
99-
StatListMod.registerStats(); //Guarantees stats register with all information
92+
StatListMod.registerStats(); // Guarantees stats register with all
93+
// information
10094
}
10195

10296
@EventHandler
@@ -120,10 +114,10 @@ public void onServerStarted(FMLServerStartedEvent evt) {
120114
public void onServerStopped(FMLServerStoppedEvent evt) {
121115
proxy.onServerStopped(evt);
122116
}
123-
117+
124118
@SubscribeEvent
125119
public void onConfigChanged(OnConfigChangedEvent eventArgs) {
126-
if( eventArgs.modID.equals(ID) ) {
120+
if (eventArgs.modID.equals(ID)) {
127121
config.syncConfig();
128122
}
129123
}

java/com/httymd/client/ClientProxy.java

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
import com.httymd.client.event.PlayerClientHandler;
44
import com.httymd.client.model.dragon.ModelNightFury;
5+
import com.httymd.client.model.dragon.ModelSkrill;
56
import com.httymd.client.model.dragon.ModelTerribleTerror;
67
import com.httymd.client.render.dragon.RenderNightFury;
8+
import com.httymd.client.render.dragon.RenderSkrill;
79
import com.httymd.client.render.dragon.RenderTerribleTerror;
810
import com.httymd.client.util.KeyInputHandler;
911
import com.httymd.common.CommonProxy;
1012
import com.httymd.entity.dragon.EntityNightFury;
13+
import com.httymd.entity.dragon.EntitySkrill;
1114
import com.httymd.entity.dragon.EntityTerribleTerror;
1215

1316
import cpw.mods.fml.client.registry.RenderingRegistry;
@@ -29,12 +32,18 @@ public void onInit(FMLInitializationEvent evt) {
2932
}
3033

3134
private void registerRendering() {
32-
// RenderingRegistry.registerEntityRenderingHandler(EntityGronkle.class, new RenderGronkle(new ModelGronkle(), 1));
33-
RenderingRegistry.registerEntityRenderingHandler(EntityNightFury.class, new RenderNightFury(new ModelNightFury(), 1));
34-
// RenderingRegistry.registerEntityRenderingHandler(EntityNightmare.class, new RenderNightmare(new ModelNightmare(), 1));
35-
//RenderingRegistry.registerEntityRenderingHandler(EntitySkrill.class, new RenderSkrill(new ModelSkrill(), 1));
36-
RenderingRegistry.registerEntityRenderingHandler(EntityTerribleTerror.class, new RenderTerribleTerror(new ModelTerribleTerror(), 1));
37-
// RenderingRegistry.registerEntityRenderingHandler(EntityZippleback.class, new RenderZippleback(new ModelZippleback(), 1));
38-
//MinecraftForgeClient.registerItemRenderer(ItemRegistry.zippleGasContainer, new RenderItemContainer());
39-
}
35+
// RenderingRegistry.registerEntityRenderingHandler(EntityGronkle.class,
36+
// new RenderGronkle(new ModelGronkle(), 1));
37+
RenderingRegistry.registerEntityRenderingHandler(EntityNightFury.class,
38+
new RenderNightFury(new ModelNightFury(), 2));
39+
// RenderingRegistry.registerEntityRenderingHandler(EntityNightmare.class,
40+
// new RenderNightmare(new ModelNightmare(), 1));
41+
RenderingRegistry.registerEntityRenderingHandler(EntitySkrill.class, new RenderSkrill(new ModelSkrill(), 2));
42+
RenderingRegistry.registerEntityRenderingHandler(EntityTerribleTerror.class,
43+
new RenderTerribleTerror(new ModelTerribleTerror(), 1));
44+
// RenderingRegistry.registerEntityRenderingHandler(EntityZippleback.class,
45+
// new RenderZippleback(new ModelZippleback(), 1));
46+
// MinecraftForgeClient.registerItemRenderer(ItemRegistry.zippleGasContainer,
47+
// new RenderItemContainer());
48+
}
4049
}

java/com/httymd/client/GuiConfigDragons.java

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,30 @@ public class GuiConfigDragons extends GuiConfig {
1313

1414
@SuppressWarnings({ "rawtypes", "unchecked" })
1515
public GuiConfigDragons(GuiScreen parentScreen) {
16-
super(parentScreen,
17-
new ConfigElement(HTTYMDMod.getConfig().getConfig().getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(),
18-
HTTYMDMod.ID,
19-
true,
20-
false,
21-
"The HTTYMD Config");
22-
titleLine2 = "cause the Ender Dragon wasn't fun enough";
16+
super(parentScreen,
17+
new ConfigElement(HTTYMDMod.getConfig().getConfig().getCategory(Configuration.CATEGORY_GENERAL))
18+
.getChildElements(),
19+
HTTYMDMod.ID, true, false, "The HTTYMD Config");
20+
titleLine2 = "cause the Ender Dragon wasn't fun enough";
21+
}
22+
23+
@Override
24+
public void initGui() {
25+
// You can add buttons and initialize fields here
26+
super.initGui();
27+
}
28+
29+
@Override
30+
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
31+
// You can do things like create animations, draw additional elements,
32+
// etc. here
33+
super.drawScreen(mouseX, mouseY, partialTicks);
34+
}
35+
36+
@Override
37+
protected void actionPerformed(GuiButton button) {
38+
// You can process any additional buttons you may have added here
39+
super.actionPerformed(button);
2340
}
2441

25-
@Override
26-
public void initGui()
27-
{
28-
// You can add buttons and initialize fields here
29-
super.initGui();
30-
}
31-
32-
33-
@Override
34-
public void drawScreen(int mouseX, int mouseY, float partialTicks)
35-
{
36-
// You can do things like create animations, draw additional elements, etc. here
37-
super.drawScreen(mouseX, mouseY, partialTicks);
38-
}
39-
40-
@Override
41-
protected void actionPerformed(GuiButton button)
42-
{
43-
// You can process any additional buttons you may have added here
44-
super.actionPerformed(button);
45-
}
46-
4742
}

java/com/httymd/client/GuiFactoryDragons.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class GuiFactoryDragons implements IModGuiFactory {
1010

1111
@Override
1212
public void initialize(Minecraft minecraftInstance) {
13-
13+
1414
}
1515

1616
@Override
@@ -24,8 +24,7 @@ public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
2424
}
2525

2626
@Override
27-
public RuntimeOptionGuiHandler getHandlerFor(
28-
RuntimeOptionCategoryElement element) {
27+
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
2928
return null;
3029
}
3130

java/com/httymd/client/animation/AnimationHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public void animate() {
4141
long time = System.currentTimeMillis();
4242
long currentStep = (time - currentStart);
4343

44-
if (currentStep > currentAnimation.duration && (!currentIsLoop || nextAnimation != null || nextPriority == Priority.WAIT_FOR_ANIM_TO_FINISH))
44+
if (currentStep > currentAnimation.duration
45+
&& (!currentIsLoop || nextAnimation != null || nextPriority == Priority.WAIT_FOR_ANIM_TO_FINISH))
4546
switchAnimation();
4647

4748
currentAnimation.animate(dragon, currentStep);

java/com/httymd/client/audio/AudioRegistry.java

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@
88
import net.minecraft.util.ResourceLocation;
99

1010
public class AudioRegistry {
11-
12-
private static final List<SoundEntry> music = new ArrayList<SoundEntry>();
13-
14-
public static void addMusic(String soundNames, boolean whenStart) {
15-
music.add(new SoundEntry(PositionedSoundRecord.func_147673_a(new ResourceLocation(HTTYMDMod.ID+":"+soundNames)), whenStart));
16-
}
17-
18-
public static void update() {
19-
for(SoundEntry e : music) {
20-
if(e.playNow) {
21-
Minecraft.getMinecraft().getSoundHandler().playSound(e.entry);
22-
}
23-
}
24-
}
25-
26-
27-
11+
12+
private static final List<SoundEntry> music = new ArrayList<SoundEntry>();
13+
14+
public static void addMusic(String soundNames, boolean whenStart) {
15+
music.add(new SoundEntry(
16+
PositionedSoundRecord.func_147673_a(new ResourceLocation(HTTYMDMod.ID + ":" + soundNames)), whenStart));
17+
}
18+
19+
public static void update() {
20+
for (SoundEntry e : music) {
21+
if (e.playNow) {
22+
Minecraft.getMinecraft().getSoundHandler().playSound(e.entry);
23+
}
24+
}
25+
}
26+
2827
}

java/com/httymd/client/audio/SoundEntry.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import net.minecraft.client.audio.ISound;
44

55
public class SoundEntry {
6-
7-
public final ISound entry;
8-
public final boolean playNow;
9-
10-
public SoundEntry(ISound sound, boolean eventStart) {
11-
entry = sound;
12-
playNow = eventStart;
13-
}
14-
6+
7+
public final ISound entry;
8+
public final boolean playNow;
9+
10+
public SoundEntry(ISound sound, boolean eventStart) {
11+
entry = sound;
12+
playNow = eventStart;
13+
}
14+
1515
}

0 commit comments

Comments
 (0)