Compare commits

...

69 commits

Author SHA1 Message Date
Ell
ee43fb930c
Update specialPeopleStuff.properties 2024-10-05 14:29:11 +02:00
Ell
737a7d3d54
Update specialPeopleStuff.properties 2023-11-15 11:49:53 +01:00
Ell
f404183d54
Update specialPeopleStuff.properties 2023-03-08 12:48:22 +01:00
Ell
fe9610a6f3
Update specialPeopleStuff.properties 2022-03-22 22:46:22 +01:00
Ell
361d4122f8
Update specialPeopleStuff.properties 2022-02-03 13:54:02 +01:00
Ell
707e575586
Update specialPeopleStuff.properties 2022-01-10 22:26:38 +01:00
Ell
cb31f1efbd
Update specialPeopleStuff.properties 2021-12-21 23:43:35 +01:00
Ell
9f90ad7e62
Update specialPeopleStuff.properties 2021-03-07 22:06:54 +01:00
Ell
35ac4f5140
Update specialPeopleStuff.properties 2020-11-28 04:43:47 +01:00
Ell
127595467f add build number to ci build 2020-11-07 14:39:38 +01:00
Ell
35a2a97e00 some master->main related fixes 2020-11-07 14:32:06 +01:00
Ridanis
8e3c44ee0f Revert Armor Model from Master 2020-11-05 10:16:28 +01:00
Ridanis
1443d13df3 Revert Item Textures on Master 2020-11-05 10:15:29 +01:00
Ridanis
db7b7677f2 Item Textures 1.0.0 2020-11-05 10:08:12 +01:00
Michael Hillcox
3e61998ca8
Utils porting 2020-10-31 21:31:04 +00:00
Michael Hillcox
24fb9a26e0
I think that's mostly right 2020-10-31 21:04:39 +00:00
Michael Hillcox
9916db2991
WorldUtils mostly ported 2020-10-31 21:01:43 +00:00
Michael Hillcox
42affe942f
Fixing base classes 2020-10-31 20:42:32 +00:00
Michael Hillcox
4eee99c75b
Merge remote-tracking branch 'origin/master' 2020-10-31 19:47:38 +00:00
Michael Hillcox
4d5cc7aa58
More porting of blocks 2020-10-31 19:47:04 +00:00
canitzp
fb62b86632
I knew I forgot something
Signed-off-by: canitzp <canitzp@gmail.com>
2020-10-07 08:28:30 +02:00
canitzp
2c07ef0fa0
Start to work on DataGenerator. Crusher Recipes should now be able to be serialized to json by its Factory. In general the serializing to json is handled by the RecipeFactoryBase class.
Removed some Recipes after the decision to not port it or change it to loot tables in favor of recipes.
A lot more @Nonnull annotations.

Signed-off-by: canitzp <canitzp@gmail.com>
2020-10-07 08:25:54 +02:00
canitzp
395b6d0491
Recipe Factory changes
Signed-off-by: canitzp <canitzp@gmail.com>
2020-10-06 12:10:09 +02:00
canitzp
35ff26221a
Added CrusherRecipe and Factory
Signed-off-by: canitzp <canitzp@gmail.com>
2020-10-06 09:04:43 +02:00
canitzp
d0363ed81c
Deleted deprecated recipe classes
Signed-off-by: canitzp <canitzp@gmail.com>
2020-10-06 09:01:56 +02:00
Ell
06a2957f27
updated maven info in the readme 2020-09-30 04:20:37 +02:00
canitzp
5db1f3fbcd Deprecate old recipe classes 2020-09-25 09:02:16 +02:00
canitzp
8b22fcfa6b Compost Recipe Factory 2020-09-25 09:00:03 +02:00
canitzp
2c57a7641a Ball of Fur Recipe Factory 2020-09-25 08:30:38 +02:00
Michael Hillcox
26b021a5e9
Lots of compound fixes 2020-09-21 18:59:08 +01:00
Michael Hillcox
497b742b87
Ported most of SmilyCloud 2020-09-20 11:26:01 +01:00
Michael Hillcox
c945843038
Moved Recipes to the common package... 2020-09-20 11:15:04 +01:00
canitzp
615bde1cb8 Added CoffeeMachineIngredient and CoffeeMachineIngredientFactory 2020-09-18 07:56:55 +02:00
canitzp
829cc788c7 Starting to add RecipeFactories and Recipe Handlers. Atomic Reconstructor implemented as ItemStack/Ingredient and BlockState version 2020-09-16 11:48:12 +02:00
Michael
2ae9ed307e
More block porting work :D 2020-09-09 17:16:41 +01:00
Michael
f44c4de74a
Sorted of fixed FastBench compat 2020-09-09 16:57:31 +01:00
Michael
9dbbb7b913
BioReactor, BlockBreaker porting 2020-09-09 16:47:51 +01:00
Michael
b51722e181
Extended Baseblock for BlockItems, auto register blockItems 2020-09-09 16:32:40 +01:00
Michael
9d8e711d35
Made Baseblock abstract, removed rarity and blockItem handlers for now
This might come back but I don't know how we're going to handle block item handling yet
2020-09-09 16:18:09 +01:00
Michael
69df7e0e81
Main class work and nulled out the RegistryHandler 2020-09-09 16:10:55 +01:00
Michael
47f11f0287
Continued Refactors... 2020-09-09 15:49:01 +01:00
Michael
be421af8e2
Big Refactor of the package layout
Ignore this commit for diffs
2020-09-09 15:48:43 +01:00
Michael
17473ae179
Added back the folders for workingdirectories 2020-09-09 15:42:35 +01:00
Michael
4c439f5b56
Merge remote-tracking branch 'origin/master' 2020-09-09 15:34:40 +01:00
Michael
78b9055eae
Hud display port and nulled out creativeTab 2020-09-09 15:33:43 +01:00
canitzp
fb1663f106 Reimplemented Atomic Deconstructor, Battery Box and Bio Reactor Blocks 2020-09-09 10:58:32 +02:00
canitzp
a5c031c135 Undeprecated BlockBase and BlockItemBase; reimplemented crystal cluster blocks (loot tables missing) 2020-09-09 09:58:55 +02:00
Michael
6139ca68fa
InitBlocks no longer has errors and all blocks contructors are now correct 2020-09-08 15:41:52 +01:00
Michael
6e0fb39544
Fixing Registry contructors on blocks and slowly migrating block contructors 2020-09-07 23:46:45 +01:00
Michael
0b964b4c89
Ported the block registry to Deferred Registry 2020-09-07 20:17:53 +01:00
Michael
99b7e0bf43
Render package ported 2020-09-07 19:33:27 +01:00
Michael
aa015521bc
Bumped mappings, deprecated some base classes (for now), ported remaining 2020-09-07 18:43:02 +01:00
Michael
40d27de0f5
Mass removed all license headers 2020-09-07 15:29:31 +01:00
Michael
d04ba602d8
Ported the api package. All minor changes 2020-09-07 15:24:04 +01:00
canitzp
4020a1a95d Update to 1.15.2 2020-09-07 15:10:08 +02:00
Ell
34d151c878
Delete the old license 2020-09-06 22:06:49 +02:00
Ell
9d6118ef27
Changed license to MIT 2020-09-06 22:06:22 +02:00
Ell
e32d6d5866 actually apply the maven plugin maybe? 2020-09-06 21:49:25 +02:00
Ell
7d974b909b set up jenkins 2020-09-06 21:46:49 +02:00
Ellpeck
b65b646dc8
Create FUNDING.yml 2020-06-15 02:06:42 +02:00
Ellpeck
896a082d74
Update specialPeopleStuff.properties 2020-04-15 20:35:11 +02:00
Ellpeck
1355a8e0a1
Update specialPeopleStuff.properties 2020-04-09 02:18:50 +02:00
Ellpeck
b9cdc48868
Update specialPeopleStuff.properties 2020-04-03 23:48:54 +02:00
Ellpeck
5180afb19d
Update specialPeopleStuff.properties 2020-03-09 16:36:14 +01:00
Ellpeck
b2493cd071
Update specialPeopleStuff.properties 2020-03-05 00:44:19 +01:00
Ellpeck
714b3a8433
Update specialPeopleStuff.properties 2020-01-27 20:37:14 +01:00
Brennan Ward
36aeb38ce7 Switch deps to https + specific versions 2019-11-08 02:15:54 -05:00
Brennan Ward
90c937a27a Update buildscript, add setup.bat 2019-11-07 20:26:53 -05:00
Johannes
5cf1d2e674 Update buildscript and resource data to 1.14.4 (#1292)
* Update gradlew wrapper

* Update buildscript to 1.14

* Fix wrong plugin path

* Replace mcmod.info with new mods.toml

* Add pack mcmeta

* Move logo to main folder because forge 1.14.4 cannot load logo files with a path

* Fix version number is wrong

* Add jei

* Add manifest data (Used for version replacement)
2019-11-07 12:59:07 -05:00
838 changed files with 9374 additions and 13247 deletions

2
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,2 @@
github: Ellpeck
patreon: Ellpeck

35
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,35 @@
pipeline {
agent any
stages {
stage('Clean') {
steps {
sh './gradlew clean --no-daemon'
}
}
stage('Build') {
steps {
sh './gradlew build --no-daemon'
}
}
stage('Upload Artifacts') {
steps {
archiveArtifacts 'build/libs/**.jar'
}
}
stage('Publish') {
when {
branch 'main'
}
steps {
sh './gradlew publish --no-daemon'
}
}
}
environment {
local_maven = '/var/www/maven'
}
}

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2015-2020 Ellpeck
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,32 +0,0 @@
#### All Rights Reserved
The things listed below are special cases and exceptions from the above. They have to be respected in addition to the above.
Everything that is not listed below applies to the above.
### YOU MAY
* Fork and modify the code.
* Submit pull requests.
* Copy small parts of code for other projects.
* Make a review/spotlight of the mod or use it in a modpack.
* Make Let's Play (and similar) videos containing the mod.
### YOU CAN NOT
* Copy entire classes, methods or features or claim you made them.
* Redistribute the mod. This does not apply, however, when it comes to pre-packaged modpacks.
### YOU HAVE TO
* When modifying or using code, always explicitly credit Ellpeck as the creator.
* When making a review/spotlight containing the mod or using it in a modpack, always make clear that Actually Additions is used.
* When it comes to the code, always link back to the official repository.
* When it comes to the mod, always link back to the the official Minecraft Forum thread or CurseForge page.
### NOTES
* There is no warranty of any kind given. The creator is not to be held liable for bugs, problems or issues.
* The Actually Additions API can be used in other projects, however it should not be modified. It can be redistributed with other mods (if necessary), however it should still be visible that it is a part of Actually Additions. Do not remove the copyright header from any of the API's files.
* The above License only applies for code that is part of the mod itself, any APIs used (such as the CoFH API) are licensed by their respective publishers.
* Excerpts from other code used (such as the OpenBlocks XP system) are explicitly declared as such and the above point applies for them.
* You are not allowed to copy the assets used in this mod for any other project.
* Parts of this license, especially restrictive ones, can be ignored with personal permission. Said permission, however, will only be given to people I know or someone who has a very good reason for needing it.
© 2015-2017 Ellpeck

View file

@ -2,9 +2,7 @@
For more information, visit the main CurseForge Page by [clicking here](http://minecraft.curseforge.com/projects/actually-additions)! For more information, visit the main CurseForge Page by [clicking here](http://minecraft.curseforge.com/projects/actually-additions)!
Jenkins: [Click here](https://ci.chaosfield.at/job/ActuallyAdditions/) Jenkins: [Click here](https://ci.ellpeck.de/blue/organizations/jenkins/ActuallyAdditions/)
Maven: [Click here](https://maven.chaosfield.at/de/ellpeck/actuallyadditions/) Maven: [Click here](https://maven.ellpeck.de/de/ellpeck/actuallyadditions/)
Actually Additions is also on the [ModMaven](https://modmaven.k-4u.nl/info.html): [Click here](https://modmaven.k-4u.nl/de/ellpeck/actuallyadditions/) ![](https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/main/pics/logo.png)
![](https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/pics/logo.png)

View file

@ -1,115 +1,148 @@
buildscript { buildscript {
repositories { repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter() jcenter()
maven { mavenCentral()
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'maven-publish'
version = "1.12.2-r150" version = mod_version
group = "de.ellpeck.actuallyadditions" group = "de.ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions" archivesBaseName = "actuallyadditions-${mc_version}"
if(hasProperty('buildnumber')){ if (System.getenv('BUILD_NUMBER') != null) {
version = "${version}-${this.properties['buildnumber']}" version += "." + System.getenv('BUILD_NUMBER')
}
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
sourceSets {
main.resources.srcDirs += 'src/generated/resources'
} }
minecraft { minecraft {
version = "1.12.2-14.23.5.2836" mappings channel: "snapshot", version: mcp_version
runDir = "run" // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
mappings = "stable_39"
makeObfSourceJar = false runs {
replaceIn "ActuallyAdditions.java" client {
replace "@VERSION@", project.version.toString() properties 'forge.logging.markers': ''
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run')
mods {
actuallyadditions {
source sourceSets.main
}
}
}
server {
properties 'forge.logging.markers': ''
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run/server')
mods {
actuallyadditions {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run/data')
args "--mod", "actuallyadditions", "--all", "--output", file('src/generated/resources/'), "--existing", file('src/main/resources')
mods {
actuallyadditions {
source sourceSets.main
}
}
}
}
} }
repositories { repositories {
maven { maven {
url "https://dvs1.progwml6.com/files/maven" name = "Progwml6 maven / JEI Maven"
url = "https://dvs1.progwml6.com/files/maven/"
} }
maven { maven {
url "http://tehnut.info/maven" name = "ModMaven / JEI Mirror"
} url = "https://modmaven.k-4u.nl"
maven { }
url "https://dl.bintray.com/cyclopsmc/dev/" maven {
url = "https://www.cursemaven.com"
} }
} }
dependencies { dependencies {
deobfCompile "mezz.jei:jei_1.12.2:+" minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}"
deobfCompile "mcp.mobius.waila:Hwyla:1.8+"
deobfCompile ("org.cyclops.commoncapabilities:CommonCapabilities:1.12.2-+")
}
processResources { // compile against the JEI API but do not include it at runtime
inputs.property "version", project.version compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api")
inputs.property "mcversion", project.minecraft.version // at runtime, use the full JEI jar
runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}")
from(sourceSets.main.resources.srcDirs) { compile "curse.maven:fastworkbench:3003114"
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
} }
jar { jar {
manifest {
attributes(["Specification-Title": "actuallyadditions",
"Specification-Vendor": "Ellpeck",
"Specification-Version": mod_version,
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"Ellpeck",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
}
} }
task deobfJar(type: Jar) { task deobfJar(type: Jar) {
from sourceSets.main.output from(sourceSets.main.output)
from sourceSets.main.java archiveName = "${baseName}-${version}-deobf.${extension}"
classifier = 'dev'
}
task apiJar(type: Jar) {
from sourceSets.main.output
from sourceSets.main.java
classifier = 'api'
include 'de/ellpeck/actuallyadditions/api/**'
}
javadoc {
include 'de/ellpeck/actuallyadditions/api/**'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from 'build/docs/javadoc'
classifier 'javadoc'
} }
task sourcesJar(type: Jar) { task sourcesJar(type: Jar) {
from sourceSets.main.java from(sourceSets.main.allSource)
classifier = 'sources' archiveName = "${baseName}-${version}-sources.${extension}"
} }
apply plugin: 'maven-publish' artifacts {
archives deobfJar
archives sourcesJar
}
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
artifact jar groupId project.group
artifact apiJar artifactId project.archivesBaseName
artifact javadocJar version project.version
artifact sourcesJar from components.java
artifact deobfJar
artifact deobfJar {
classifier 'deobf'
}
artifact sourcesJar {
classifier 'sources'
}
pom.withXml {
def node = asNode()
if (node.dependencies.size() > 0)
node.remove(node.dependencies)
}
} }
} }
repositories { repositories {
maven { maven {
url "file:///srv/nginx/maven" url "file://" + System.getenv("local_maven")
} }
} }
} }

11
gradle.properties Normal file
View file

@ -0,0 +1,11 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
mod_version=2.0
mc_version=1.15.2
mcp_version=20200514-1.15.1
forge_version=31.2.36
jei_version=6.0.3.15

Binary file not shown.

View file

@ -1,6 +1,5 @@
#Sat Jul 01 10:16:13 EDT 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

Binary file not shown.

7
setup.bat Normal file
View file

@ -0,0 +1,7 @@
call gradlew eclipse --no-daemon
call gradlew eclipse genEclipseRuns --no-daemon
for %%I in (.) do set PROJNAME=%%~nxI
del %PROJNAME%-Client.launch
del %PROJNAME%-Server.launch
ren runClient.launch %PROJNAME%-Client.launch
ren runServer.launch %PROJNAME%-Server.launch

View file

@ -16,6 +16,7 @@ bootytoast=actuallyadditions:itemWorm
xbony2=actuallyadditions:itemBooklet xbony2=actuallyadditions:itemBooklet
#Patreon stuff #Patreon stuff
# 0 = Redstone, 1 = Lapis, 2 = Diamond, 3 = Coal, 4 = Emerald, 5 = Iron
ftog_thorgal=actuallyadditions:itemCrystal ftog_thorgal=actuallyadditions:itemCrystal
minetechniker=actuallyadditions:itemCrystalEmpowered@2 minetechniker=actuallyadditions:itemCrystalEmpowered@2
3pixel=actuallyadditions:itemMoreDamageLens 3pixel=actuallyadditions:itemMoreDamageLens
@ -41,3 +42,23 @@ spectacular101=actuallyadditions:itemCrystal@5
scottradish=actuallyadditions:itemCrystal scottradish=actuallyadditions:itemCrystal
slothicornstudio=actuallyadditions:itemCrystalEmpowered@5 slothicornstudio=actuallyadditions:itemCrystalEmpowered@5
mecharm=actuallyadditions:itemCrystal@5 mecharm=actuallyadditions:itemCrystal@5
DJAscendance=actuallyadditions:itemCrystal@2
SneezySchoo=actuallyadditions:itemCrystal@0
Mistakin=actuallyadditions:itemCrystal@3
Tonitch8=actuallyadditions:itemCrystal@4
Owlwix=actuallyadditions:itemCrystalEmpowered@5
3MJoey=actuallyadditions:itemCrystal@1
Ridanis=actuallyadditions:itemHairyBall@0
gefailter71=actuallyadditions:itemCrystalEmpowered@0
SeaSaltStar=actuallyadditions:itemCrystal@0
VlaDracul3=actuallyadditions:itemCrystal@4
slbsh=actuallyadditions:itemCrystalEmpowered@0
WolfgalVlad=actuallyadditions:itemCrystalEmpowered@2
Water_Moon=actuallyadditions:blockPhantomBooster@0
ticticboi=actuallyadditions:itemCrystalEmpowered@2
The_Boo=actuallyadditions:itemCrystalEmpowered@3
Cloniart47=actuallyadditions:itemCrystal@2
kei_kouma=actuallyadditions:itemCrystal@5
kingofaces2=actuallyadditions:itemCrystal@4
Sharkbite202020=actuallyadditions:itemCrystalEmpowered@4
ArcticPrince=actuallyadditions:blockPhantomface

View file

@ -1,20 +1,5 @@
/*
* This file ("ActuallyAdditionsAPI.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api; package de.ellpeck.actuallyadditions.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
@ -23,21 +8,20 @@ import de.ellpeck.actuallyadditions.api.internal.IMethodHandler;
import de.ellpeck.actuallyadditions.api.laser.ILaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.api.laser.ILaserRelayConnectionHandler;
import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.api.lens.Lens;
import de.ellpeck.actuallyadditions.api.lens.LensConversion; import de.ellpeck.actuallyadditions.api.lens.LensConversion;
import de.ellpeck.actuallyadditions.api.recipe.BallOfFurReturn; import de.ellpeck.actuallyadditions.api.recipe.*;
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; import de.ellpeck.actuallyadditions.common.recipes.CrusherRecipe;
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
import de.ellpeck.actuallyadditions.api.recipe.IColorLensChanger;
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
import de.ellpeck.actuallyadditions.api.recipe.OilGenRecipe;
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
import de.ellpeck.actuallyadditions.api.recipe.WeightedOre;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.Ingredient;
import net.minecraftforge.registries.IForgeRegistry;
import net.minecraftforge.registries.RegistryBuilder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public final class ActuallyAdditionsAPI { public final class ActuallyAdditionsAPI {
@ -45,6 +29,8 @@ public final class ActuallyAdditionsAPI {
public static final String API_ID = MOD_ID + "api"; public static final String API_ID = MOD_ID + "api";
public static final String API_VERSION = "34"; public static final String API_VERSION = "34";
public static final IForgeRegistry<Lens> LENS_REGISTRY = new RegistryBuilder<Lens>().disableSync().disableSaving().disableOverrides().create();
public static final List<CrusherRecipe> CRUSHER_RECIPES = new ArrayList<>(); public static final List<CrusherRecipe> CRUSHER_RECIPES = new ArrayList<>();
public static final List<BallOfFurReturn> BALL_OF_FUR_RETURN_ITEMS = new ArrayList<>(); public static final List<BallOfFurReturn> BALL_OF_FUR_RETURN_ITEMS = new ArrayList<>();
public static final List<TreasureChestLoot> TREASURE_CHEST_LOOT = new ArrayList<>(); public static final List<TreasureChestLoot> TREASURE_CHEST_LOOT = new ArrayList<>();
@ -217,7 +203,7 @@ public final class ActuallyAdditionsAPI {
* @param output The itemstack to be output from the compost once conversion finishes * @param output The itemstack to be output from the compost once conversion finishes
* @param outputDisplay The state to display when there is output in the compost * @param outputDisplay The state to display when there is output in the compost
*/ */
public static void addCompostRecipe(Ingredient input, IBlockState inputDisplay, ItemStack output, IBlockState outputDisplay) { public static void addCompostRecipe(Ingredient input, BlockState inputDisplay, ItemStack output, BlockState outputDisplay) {
COMPOST_RECIPES.add(new CompostRecipe(input, inputDisplay, output, outputDisplay)); COMPOST_RECIPES.add(new CompostRecipe(input, inputDisplay, output, outputDisplay));
} }

View file

@ -1,27 +1,17 @@
/*
* This file ("IBookletChapter.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.booklet; package de.ellpeck.actuallyadditions.api.booklet;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.api.distmarker.OnlyIn;
public interface IBookletChapter { public interface IBookletChapter {
IBookletPage[] getAllPages(); IBookletPage[] getAllPages();
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
String getLocalizedName(); String getLocalizedName();
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
String getLocalizedNameWithFormatting(); String getLocalizedNameWithFormatting();
IBookletEntry getEntry(); IBookletEntry getEntry();

View file

@ -1,19 +1,9 @@
/*
* This file ("IBookletEntry.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.booklet; package de.ellpeck.actuallyadditions.api.booklet;
import java.util.List; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.relauncher.Side; import java.util.List;
import net.minecraftforge.fml.relauncher.SideOnly;
public interface IBookletEntry { public interface IBookletEntry {
@ -21,19 +11,19 @@ public interface IBookletEntry {
String getIdentifier(); String getIdentifier();
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
String getLocalizedName(); String getLocalizedName();
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
String getLocalizedNameWithFormatting(); String getLocalizedNameWithFormatting();
void addChapter(IBookletChapter chapter); void addChapter(IBookletChapter chapter);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
List<IBookletChapter> getChaptersForDisplay(String searchBarText); List<IBookletChapter> getChaptersForDisplay(String searchBarText);
int getSortingPriority(); int getSortingPriority();
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
boolean visibleOnFrontPage(); boolean visibleOnFrontPage();
} }

View file

@ -1,23 +1,13 @@
/*
* This file ("IBookletPage.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.booklet; package de.ellpeck.actuallyadditions.api.booklet;
import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import java.awt.*;
import java.util.List;
public interface IBookletPage { public interface IBookletPage {
@ -29,31 +19,32 @@ public interface IBookletPage {
void setChapter(IBookletChapter chapter); void setChapter(IBookletChapter chapter);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
String getInfoText(); String getInfoText();
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void mouseClicked(GuiBookletBase gui, int mouseX, int mouseY, int mouseButton); void mouseClicked(GuiBookletBase gui, int mouseX, int mouseY, int mouseButton);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void mouseReleased(GuiBookletBase gui, int mouseX, int mouseY, int state); void mouseReleased(GuiBookletBase gui, int mouseX, int mouseY, int state);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void mouseClickMove(GuiBookletBase gui, int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick); void mouseClickMove(GuiBookletBase gui, int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick);
@SideOnly(Side.CLIENT) // todo: this won't be needed anymore
void actionPerformed(GuiBookletBase gui, GuiButton button); @OnlyIn(Dist.CLIENT)
void actionPerformed(GuiBookletBase gui, Button button);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void initGui(GuiBookletBase gui, int startX, int startY); void initGui(GuiBookletBase gui, int startX, int startY);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer); void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks); void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks);
@SideOnly(Side.CLIENT) @OnlyIn(Dist.CLIENT)
void drawScreenPost(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks); void drawScreenPost(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks);
boolean shouldBeOnLeftSide(); boolean shouldBeOnLeftSide();

View file

@ -1,28 +1,24 @@
/*
* This file ("GuiBookletBase.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.booklet.internal; package de.ellpeck.actuallyadditions.api.booklet.internal;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import java.util.List; import java.util.List;
import net.minecraft.client.gui.GuiButton; public abstract class GuiBookletBase extends Screen {
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack;
public abstract class GuiBookletBase extends GuiScreen { protected GuiBookletBase(ITextComponent titleIn) {
super(new StringTextComponent(""));
}
public abstract void renderScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale); public abstract void renderScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale);
public abstract void renderSplitScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale, int length); public abstract void renderSplitScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale, int length);
public abstract List<GuiButton> getButtonList(); public abstract List<Button> getButtonList();
public abstract int getGuiLeft(); public abstract int getGuiLeft();

View file

@ -1,13 +1,3 @@
/*
* This file ("FarmerResult.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.farmer; package de.ellpeck.actuallyadditions.api.farmer;
/** /**

View file

@ -1,13 +1,3 @@
/*
* This file ("IFarmerBehavior.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.farmer; package de.ellpeck.actuallyadditions.api.farmer;
import de.ellpeck.actuallyadditions.api.internal.IFarmer; import de.ellpeck.actuallyadditions.api.internal.IFarmer;

View file

@ -1,17 +1,7 @@
/*
* This file ("IAtomicReconstructor.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.internal; package de.ellpeck.actuallyadditions.api.internal;
import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.api.lens.Lens;
import net.minecraft.util.EnumFacing; import net.minecraft.util.Direction;
/** /**
* This is a helper interface for Lens' invoke() method. * This is a helper interface for Lens' invoke() method.
@ -23,5 +13,5 @@ public interface IAtomicReconstructor extends IEnergyTile {
Lens getLens(); Lens getLens();
EnumFacing getOrientation(); Direction getOrientation();
} }

View file

@ -1,13 +1,3 @@
/*
* This file ("IEnergyTile.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.internal; package de.ellpeck.actuallyadditions.api.internal;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -27,9 +17,14 @@ public interface IEnergyTile {
int getZ(); int getZ();
//TODO: Rename to getWorld /**
* @deprecated use {@link #getWorld()}
*/
@Deprecated
World getWorldObject(); World getWorldObject();
World getWorld();
void extractEnergy(int amount); void extractEnergy(int amount);
int getEnergy(); int getEnergy();

View file

@ -1,19 +1,9 @@
/*
* This file ("IFarmer.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.internal; package de.ellpeck.actuallyadditions.api.internal;
import java.util.List;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.Direction;
import java.util.List;
/** /**
* This is a helper interface for IFarmerBehavior. * This is a helper interface for IFarmerBehavior.
@ -23,7 +13,7 @@ import net.minecraft.util.EnumFacing;
*/ */
public interface IFarmer extends IEnergyTile { public interface IFarmer extends IEnergyTile {
EnumFacing getOrientation(); Direction getOrientation();
boolean canAddToSeeds(List<ItemStack> stacks); boolean canAddToSeeds(List<ItemStack> stacks);

View file

@ -1,28 +1,17 @@
/*
* This file ("IMethodHandler.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.internal; package de.ellpeck.actuallyadditions.api.internal;
import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; import net.minecraft.block.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.EffectInstance;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import java.util.List;
/** /**
* This is the internal method handler. * This is the internal method handler.
* Use ActuallyAdditionsAPI.methodHandler for calling * Use ActuallyAdditionsAPI.methodHandler for calling
@ -32,15 +21,15 @@ public interface IMethodHandler {
boolean addEffectToStack(ItemStack stack, CoffeeIngredient ingredient); boolean addEffectToStack(ItemStack stack, CoffeeIngredient ingredient);
PotionEffect getSameEffectFromStack(ItemStack stack, PotionEffect effect); EffectInstance getSameEffectFromStack(ItemStack stack, EffectInstance effect);
void addEffectProperties(ItemStack stack, PotionEffect effect, boolean addDur, boolean addAmp); void addEffectProperties(ItemStack stack, EffectInstance effect, boolean addDur, boolean addAmp);
void addEffectToStack(ItemStack stack, PotionEffect effect); void addEffectToStack(ItemStack stack, EffectInstance effect);
PotionEffect[] getEffectsFromStack(ItemStack stack); EffectInstance[] getEffectsFromStack(ItemStack stack);
boolean invokeConversionLens(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile); boolean invokeConversionLens(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
boolean invokeReconstructor(IAtomicReconstructor tile); boolean invokeReconstructor(IAtomicReconstructor tile);

View file

@ -1,23 +1,13 @@
/*
* This file ("IConnectionPair.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.laser; package de.ellpeck.actuallyadditions.api.laser;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
public interface IConnectionPair { public interface IConnectionPair {
void writeToNBT(NBTTagCompound compound); void writeToNBT(CompoundNBT compound);
void readFromNBT(NBTTagCompound compound); void readFromNBT(CompoundNBT compound);
BlockPos[] getPositions(); BlockPos[] getPositions();

View file

@ -1,13 +1,3 @@
/*
* This file ("ILaserRelayConnectionHandler.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.laser; package de.ellpeck.actuallyadditions.api.laser;
import io.netty.util.internal.ConcurrentSet; import io.netty.util.internal.ConcurrentSet;

View file

@ -1,13 +1,3 @@
/*
* This file ("LaserType.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.laser; package de.ellpeck.actuallyadditions.api.laser;
public enum LaserType { public enum LaserType {

View file

@ -1,13 +1,3 @@
/*
* This file ("Network.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.laser; package de.ellpeck.actuallyadditions.api.laser;
import io.netty.util.internal.ConcurrentSet; import io.netty.util.internal.ConcurrentSet;

View file

@ -1,13 +1,3 @@
/*
* This file ("ILensItem.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.lens; package de.ellpeck.actuallyadditions.api.lens;
/** /**

View file

@ -1,24 +1,16 @@
/*
* This file ("Lens.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.lens; package de.ellpeck.actuallyadditions.api.lens;
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.BlockState;
import net.minecraft.util.EnumFacing; import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraftforge.registries.ForgeRegistryEntry;
import net.minecraftforge.registries.IForgeRegistryEntry;
/** /**
* This is the base class for a Reconstructor Lens Type (NOT THE ITEM!) * This is the base class for a Reconstructor Lens Type (NOT THE ITEM!)
*/ */
public abstract class Lens { public abstract class Lens extends ForgeRegistryEntry<Lens> {
/** /**
* Invokes the lens type's behavior on a block * Invokes the lens type's behavior on a block
@ -27,7 +19,7 @@ public abstract class Lens {
* @param tile The tile the lens was invoked from * @param tile The tile the lens was invoked from
* @return If the Reconstructor should stop continuing (return false if you want it to go through blocks) * @return If the Reconstructor should stop continuing (return false if you want it to go through blocks)
*/ */
public abstract boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile); public abstract boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile);
/** /**
* Returns the color in an array of 3 float values that are r, g, b * Returns the color in an array of 3 float values that are r, g, b
@ -42,7 +34,7 @@ public abstract class Lens {
/** /**
* @return If the lens can be invoked at the current time * @return If the lens can be invoked at the current time
*/ */
public boolean canInvoke(IAtomicReconstructor tile, EnumFacing sideToShootTo, int energyUsePerShot) { public boolean canInvoke(IAtomicReconstructor tile, Direction sideToShootTo, int energyUsePerShot) {
return true; return true;
} }
} }

View file

@ -1,18 +1,8 @@
/*
* This file ("LensConversion.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.lens; package de.ellpeck.actuallyadditions.api.lens;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
/** /**
@ -25,7 +15,7 @@ import net.minecraft.util.math.BlockPos;
public class LensConversion extends Lens { public class LensConversion extends Lens {
@Override @Override
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) { public boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) {
return ActuallyAdditionsAPI.methodHandler.invokeConversionLens(hitState, hitBlock, tile); return ActuallyAdditionsAPI.methodHandler.invokeConversionLens(hitState, hitBlock, tile);
} }

View file

@ -7,6 +7,5 @@ public interface IDisableableItem {
* If this returns true, assume the item is not registered with the game, but may still be instantiated. * If this returns true, assume the item is not registered with the game, but may still be instantiated.
* @return If the item has not been registered with the Forge Registry. * @return If the item has not been registered with the Forge Registry.
*/ */
public boolean isDisabled(); boolean isDisabled();
} }

View file

@ -1,13 +1,3 @@
/*
* This file ("IDisplayStandItem.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.misc; package de.ellpeck.actuallyadditions.api.misc;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -1,13 +1,3 @@
/*
* This file ("IGoggles.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.misc; package de.ellpeck.actuallyadditions.api.misc;
public interface IGoggles { public interface IGoggles {

View file

@ -1,14 +1,4 @@
/* // todo: not sure how to denote this anymore
* This file ("package-info.java") is part of the Actually Additions mod for Minecraft. //@API(owner = ActuallyAdditionsAPI.MOD_ID, apiVersion = ActuallyAdditionsAPI.API_VERSION, provides = ActuallyAdditionsAPI.API_ID)
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
@API(owner = ActuallyAdditionsAPI.MOD_ID, apiVersion = ActuallyAdditionsAPI.API_VERSION, provides = ActuallyAdditionsAPI.API_ID)
package de.ellpeck.actuallyadditions.api; package de.ellpeck.actuallyadditions.api;
import net.minecraftforge.fml.common.API;

View file

@ -1,25 +0,0 @@
/*
* This file ("BallOfFurReturn.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandom;
public class BallOfFurReturn extends WeightedRandom.Item {
public final ItemStack returnItem;
public BallOfFurReturn(ItemStack returnItem, int chance) {
super(chance);
this.returnItem = returnItem;
}
}

View file

@ -1,58 +0,0 @@
/*
* This file ("CoffeeIngredient.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.potion.PotionEffect;
public class CoffeeIngredient {
protected final Ingredient input;
protected final int maxAmplifier;
protected PotionEffect[] effects;
@Deprecated
public CoffeeIngredient(ItemStack input, PotionEffect[] effects, int maxAmplifier) {
this(Ingredient.fromStacks(input), maxAmplifier, effects);
}
public CoffeeIngredient(Ingredient input, int maxAmplifier, PotionEffect... effects) {
this.input = input;
this.effects = effects;
this.maxAmplifier = maxAmplifier;
}
public boolean matches(ItemStack stack) {
return this.input.apply(stack);
}
public Ingredient getInput() {
return this.input;
}
public PotionEffect[] getEffects() {
return this.effects;
}
public boolean effect(ItemStack stack) {
return ActuallyAdditionsAPI.methodHandler.addEffectToStack(stack, this);
}
public String getExtraText() {
return "";
}
public int getMaxAmplifier() {
return this.maxAmplifier;
}
}

View file

@ -1,17 +1,7 @@
/*
* This file ("ColorLensChangerByDyeMeta.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe; package de.ellpeck.actuallyadditions.api.recipe;
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -21,11 +11,14 @@ import net.minecraft.util.math.BlockPos;
*/ */
public class ColorLensChangerByDyeMeta implements IColorLensChanger { public class ColorLensChangerByDyeMeta implements IColorLensChanger {
/**
* @todo: this is very very likely to no longer work...
*/
@Override @Override
public ItemStack modifyItem(ItemStack stack, IBlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile) { public ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile) {
ItemStack newStack = stack.copy(); ItemStack newStack = stack.copy();
int meta = newStack.getItemDamage(); int meta = newStack.getDamage();
newStack.setItemDamage((meta + 1) % 16); newStack.setDamage((meta + 1) % 16);
return newStack; return newStack;
} }
} }

View file

@ -1,57 +0,0 @@
/*
* This file ("CompostRecipe.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
public class CompostRecipe {
protected final Ingredient input;
protected final ItemStack output;
protected final IBlockState inputDisplay;
protected final IBlockState outputDisplay;
@Deprecated
public CompostRecipe(ItemStack input, Block inputDisplay, ItemStack output, Block outputDisplay) {
this(Ingredient.fromStacks(input), inputDisplay.getDefaultState(), output, outputDisplay.getDefaultState());
}
public CompostRecipe(Ingredient input, IBlockState inputDisplay, ItemStack output, IBlockState outputDisplay) {
this.input = input;
this.output = output;
this.inputDisplay = inputDisplay;
this.outputDisplay = outputDisplay;
}
public boolean matches(ItemStack stack) {
return this.input.apply(stack);
}
public Ingredient getInput() {
return this.input;
}
public ItemStack getOutput() {
return this.output;
}
public IBlockState getInputDisplay() {
return this.inputDisplay;
}
public IBlockState getOutputDisplay() {
return this.outputDisplay;
}
}

View file

@ -1,55 +0,0 @@
/*
* This file ("CrusherRecipe.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
public class CrusherRecipe {
protected Ingredient input;
protected ItemStack outputOne;
protected ItemStack outputTwo;
protected int outputChance;
@Deprecated
public CrusherRecipe(ItemStack input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {
this(Ingredient.fromStacks(input), outputOne, outputTwo, outputChance);
}
public CrusherRecipe(Ingredient input, ItemStack outputOne, ItemStack outputTwo, int outputChance) {
this.input = input;
this.outputOne = outputOne;
this.outputTwo = outputTwo;
this.outputChance = outputChance;
}
public boolean matches(ItemStack stack) {
return this.input.apply(stack);
}
public ItemStack getOutputOne() {
return this.outputOne;
}
public ItemStack getOutputTwo() {
return this.outputTwo;
}
public int getSecondChance() {
return this.outputChance;
}
public Ingredient getInput() {
return this.input;
}
}

View file

@ -1,21 +1,11 @@
/*
* This file ("EmpowererRecipe.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe; package de.ellpeck.actuallyadditions.api.recipe;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.Ingredient;
import java.util.ArrayList;
import java.util.List;
public class EmpowererRecipe { public class EmpowererRecipe {
protected final Ingredient input; protected final Ingredient input;
@ -48,21 +38,21 @@ public class EmpowererRecipe {
} }
public boolean matches(ItemStack base, ItemStack stand1, ItemStack stand2, ItemStack stand3, ItemStack stand4) { public boolean matches(ItemStack base, ItemStack stand1, ItemStack stand2, ItemStack stand3, ItemStack stand4) {
if (!this.input.apply(base)) return false; if (!this.input.test(base)) return false;
List<Ingredient> matches = new ArrayList<>(); List<Ingredient> matches = new ArrayList<>();
ItemStack[] stacks = { stand1, stand2, stand3, stand4 }; ItemStack[] stacks = { stand1, stand2, stand3, stand4 };
boolean[] unused = { true, true, true, true }; boolean[] unused = { true, true, true, true };
for (ItemStack s : stacks) { for (ItemStack s : stacks) {
if (unused[0] && this.modifier1.apply(s)) { if (unused[0] && this.modifier1.test(s)) {
matches.add(this.modifier1); matches.add(this.modifier1);
unused[0] = false; unused[0] = false;
} else if (unused[1] && this.modifier2.apply(s)) { } else if (unused[1] && this.modifier2.test(s)) {
matches.add(this.modifier2); matches.add(this.modifier2);
unused[1] = false; unused[1] = false;
} else if (unused[2] && this.modifier3.apply(s)) { } else if (unused[2] && this.modifier3.test(s)) {
matches.add(this.modifier3); matches.add(this.modifier3);
unused[2] = false; unused[2] = false;
} else if (unused[3] && this.modifier4.apply(s)) { } else if (unused[3] && this.modifier4.test(s)) {
matches.add(this.modifier4); matches.add(this.modifier4);
unused[3] = false; unused[3] = false;
} }

View file

@ -1,17 +1,7 @@
/*
* This file ("IColorLensChanger.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe; package de.ellpeck.actuallyadditions.api.recipe;
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -35,6 +25,6 @@ public interface IColorLensChanger {
* @param tile the Reconstructor doing the color conversion * @param tile the Reconstructor doing the color conversion
* @return the modified stack. Please make sure to return a modified COPY of the input stack. * @return the modified stack. Please make sure to return a modified COPY of the input stack.
*/ */
ItemStack modifyItem(ItemStack stack, IBlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile); ItemStack modifyItem(ItemStack stack, BlockState hitBlockState, BlockPos hitBlock, IAtomicReconstructor tile);
} }

View file

@ -1,18 +1,8 @@
/*
* This file ("LensConversionRecipe.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe; package de.ellpeck.actuallyadditions.api.recipe;
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.api.lens.Lens;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.BlockState;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -37,7 +27,7 @@ public class LensConversionRecipe {
} }
public boolean matches(ItemStack input, Lens lens) { public boolean matches(ItemStack input, Lens lens) {
return this.input.apply(input) && this.type == lens; return this.input.test(input) && this.type == lens;
} }
public Ingredient getInput() { public Ingredient getInput() {
@ -56,6 +46,6 @@ public class LensConversionRecipe {
return this.type; return this.type;
} }
public void transformHook(ItemStack stack, IBlockState state, BlockPos pos, IAtomicReconstructor tile) { public void transformHook(ItemStack stack, BlockState state, BlockPos pos, IAtomicReconstructor tile) {
} }
} }

View file

@ -1,13 +1,3 @@
/*
* This file ("OilGenRecipe.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe; package de.ellpeck.actuallyadditions.api.recipe;
public class OilGenRecipe { public class OilGenRecipe {

View file

@ -1,13 +1,3 @@
/*
* This file ("TreasureChestLoot.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe; package de.ellpeck.actuallyadditions.api.recipe;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -1,13 +1,3 @@
/*
* This file ("WeightedOre.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.recipe; package de.ellpeck.actuallyadditions.api.recipe;
import net.minecraft.util.WeightedRandom; import net.minecraft.util.WeightedRandom;

View file

@ -1,13 +1,3 @@
/*
* This file ("IPhantomTile.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.api.tile; package de.ellpeck.actuallyadditions.api.tile;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet;
* This file ("InitBooklet.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -20,68 +10,68 @@ import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.common.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors; import de.ellpeck.actuallyadditions.common.blocks.metalists.TheColoredLampColors;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.common.blocks.metalists.TheMiscBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapter; import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapter;
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapterCoffee; import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapterCoffee;
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapterCrusher; import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapterCrusher;
import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapterTrials; import de.ellpeck.actuallyadditions.booklet.chapter.BookletChapterTrials;
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntry; import de.ellpeck.actuallyadditions.booklet.entry.BookletEntry;
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryAllItems; import de.ellpeck.actuallyadditions.booklet.entry.BookletEntryAllItems;
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials; import de.ellpeck.actuallyadditions.booklet.entry.BookletEntryTrials;
import de.ellpeck.actuallyadditions.mod.booklet.page.BookletPage; import de.ellpeck.actuallyadditions.booklet.page.BookletPage;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrafting; import de.ellpeck.actuallyadditions.booklet.page.PageCrafting;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe; import de.ellpeck.actuallyadditions.booklet.page.PageCrusherRecipe;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageEmpowerer; import de.ellpeck.actuallyadditions.booklet.page.PageEmpowerer;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageFurnace; import de.ellpeck.actuallyadditions.booklet.page.PageFurnace;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageLinkButton; import de.ellpeck.actuallyadditions.booklet.page.PageLinkButton;
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.booklet.page.PagePicture;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageReconstructor; import de.ellpeck.actuallyadditions.booklet.page.PageReconstructor;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTextOnly; import de.ellpeck.actuallyadditions.booklet.page.PageTextOnly;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.common.config.values.ConfigIntValues;
import de.ellpeck.actuallyadditions.mod.crafting.BlockCrafting; import de.ellpeck.actuallyadditions.common.crafting.BlockCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting; import de.ellpeck.actuallyadditions.common.crafting.CrusherCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.FoodCrafting; import de.ellpeck.actuallyadditions.common.crafting.FoodCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.ItemCrafting; import de.ellpeck.actuallyadditions.common.crafting.ItemCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.MiscCrafting; import de.ellpeck.actuallyadditions.common.crafting.MiscCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.ToolCrafting; import de.ellpeck.actuallyadditions.common.crafting.ToolCrafting;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.common.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.gen.AAWorldGen; import de.ellpeck.actuallyadditions.common.gen.AAWorldGen;
import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves; import de.ellpeck.actuallyadditions.common.gen.WorldGenLushCaves;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.common.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats; import de.ellpeck.actuallyadditions.common.items.ItemWingsOfTheBats;
import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting; import de.ellpeck.actuallyadditions.common.items.lens.LensDisenchanting;
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler; import de.ellpeck.actuallyadditions.common.items.lens.LensRecipeHandler;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; import de.ellpeck.actuallyadditions.common.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.common.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler; import de.ellpeck.actuallyadditions.common.recipe.EmpowererHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.common.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.common.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.common.tile.TileEntityCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; import de.ellpeck.actuallyadditions.common.tile.TileEntityDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox; import de.ellpeck.actuallyadditions.common.tile.TileEntityFireworkBox;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; import de.ellpeck.actuallyadditions.common.tile.TileEntityFurnaceDouble;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar; import de.ellpeck.actuallyadditions.common.tile.TileEntityFurnaceSolar;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder; import de.ellpeck.actuallyadditions.common.tile.TileEntityGrinder;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector; import de.ellpeck.actuallyadditions.common.tile.TileEntityHeatCollector;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; import de.ellpeck.actuallyadditions.common.tile.TileEntityItemRepairer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelay;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy; import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelayEnergy;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyAdvanced; import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelayEnergyAdvanced;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyExtreme; import de.ellpeck.actuallyadditions.common.tile.TileEntityLaserRelayEnergyExtreme;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController; import de.ellpeck.actuallyadditions.common.tile.TileEntityLavaFactoryController;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator; import de.ellpeck.actuallyadditions.common.tile.TileEntityLeafGenerator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner; import de.ellpeck.actuallyadditions.common.tile.TileEntityMiner;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; import de.ellpeck.actuallyadditions.common.tile.TileEntityPhantomPlacer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomface; import de.ellpeck.actuallyadditions.common.tile.TileEntityPhantomface;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; import de.ellpeck.actuallyadditions.common.tile.TileEntityPlayerInterface;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; import de.ellpeck.actuallyadditions.common.tile.TileEntityRangedCollector;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor; import de.ellpeck.actuallyadditions.common.tile.TileEntityShockSuppressor;
import de.ellpeck.actuallyadditions.mod.update.UpdateChecker; import de.ellpeck.actuallyadditions.common.update.UpdateChecker;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.common.util.Util;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -1,27 +1,17 @@
/* package de.ellpeck.actuallyadditions.booklet.button;
* This file ("BookmarkButton.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.button;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiPage; import de.ellpeck.actuallyadditions.booklet.gui.GuiPage;
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.common.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;

View file

@ -1,19 +1,9 @@
/* package de.ellpeck.actuallyadditions.booklet.button;
* This file ("EntryButton.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.button;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.common.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;

View file

@ -1,19 +1,9 @@
/* package de.ellpeck.actuallyadditions.booklet.button;
* This file ("TrialsButton.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.button; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
public class TrialsButton extends TexturedButton { public class TrialsButton extends TexturedButton {

View file

@ -1,21 +1,11 @@
/* package de.ellpeck.actuallyadditions.booklet.chapter;
* This file ("BookletChapter.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.misc.IDisableableItem; import de.ellpeck.actuallyadditions.api.misc.IDisableableItem;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.chapter;
* This file ("BookletChapterCoffee.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -17,10 +7,9 @@ import java.util.List;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; import de.ellpeck.actuallyadditions.booklet.page.BookletPage;
import de.ellpeck.actuallyadditions.mod.booklet.page.BookletPage; import de.ellpeck.actuallyadditions.booklet.page.PageCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCoffeeMachine; import de.ellpeck.actuallyadditions.common.items.ItemCoffee;
import de.ellpeck.actuallyadditions.mod.items.ItemCoffee;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class BookletChapterCoffee extends BookletChapter { public class BookletChapterCoffee extends BookletChapter {

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.chapter;
* This file ("BookletChapterCrusher.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -16,9 +6,8 @@ import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.booklet.page.PageCrusherRecipe;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe; import de.ellpeck.actuallyadditions.common.crafting.CrusherCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class BookletChapterCrusher extends BookletChapter { public class BookletChapterCrusher extends BookletChapter {

View file

@ -1,20 +1,10 @@
/* package de.ellpeck.actuallyadditions.booklet.chapter;
* This file ("BookletChapterTrials.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.chapter;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTrials; import de.ellpeck.actuallyadditions.booklet.page.PageTrials;
import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.common.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.entry;
* This file ("BookletEntry.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.entry;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -18,9 +8,9 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag; import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.entry;
* This file ("BookletEntryAllItems.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.entry;
import java.util.List; import java.util.List;

View file

@ -0,0 +1,13 @@
package de.ellpeck.actuallyadditions.booklet.entry;
public class BookletEntryTrials extends BookletEntry {
public BookletEntryTrials(String identifier) {
super(identifier, -Integer.MAX_VALUE);
}
@Override
public boolean visibleOnFrontPage() {
return false;
}
}

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.gui;
* This file ("GuiBooklet.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.gui;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
@ -20,16 +10,16 @@ import org.lwjgl.input.Mouse;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.button.BookmarkButton; import de.ellpeck.actuallyadditions.booklet.button.BookmarkButton;
import de.ellpeck.actuallyadditions.mod.booklet.button.TrialsButton; import de.ellpeck.actuallyadditions.booklet.button.TrialsButton;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.common.config.values.ConfigIntValues;
import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.common.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave; import de.ellpeck.actuallyadditions.common.data.PlayerData.PlayerSave;
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton; import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.common.network.PacketHandlerHelper;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.common.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.GuiTextField;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.gui;
* This file ("GuiEntry.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.gui;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
@ -17,9 +7,9 @@ import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton; import de.ellpeck.actuallyadditions.booklet.button.EntryButton;
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials; import de.ellpeck.actuallyadditions.booklet.entry.BookletEntryTrials;
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -8,7 +8,7 @@
* © 2015-2017 Ellpeck * © 2015-2017 Ellpeck
*/ */
package de.ellpeck.actuallyadditions.mod.booklet.gui; package de.ellpeck.actuallyadditions.booklet.gui;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@ -16,16 +16,16 @@ import java.util.List;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet; import de.ellpeck.actuallyadditions.booklet.InitBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton; import de.ellpeck.actuallyadditions.booklet.button.EntryButton;
import de.ellpeck.actuallyadditions.mod.config.GuiConfiguration; import de.ellpeck.actuallyadditions.common.config.GuiConfiguration;
import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.common.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave; import de.ellpeck.actuallyadditions.common.data.PlayerData.PlayerSave;
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton; import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.common.network.PacketHandlerHelper;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.common.util.Util;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.gui;
* This file ("GuiPage.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.gui;
import java.awt.Desktop; import java.awt.Desktop;
import java.io.IOException; import java.io.IOException;
@ -20,11 +10,11 @@ import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
import de.ellpeck.actuallyadditions.mod.booklet.page.ItemDisplay; import de.ellpeck.actuallyadditions.booklet.page.ItemDisplay;
import de.ellpeck.actuallyadditions.mod.inventory.gui.TexturedButton; import de.ellpeck.actuallyadditions.common.inventory.gui.TexturedButton;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.misc;
* This file ("BookletUtils.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.misc;
import java.util.List; import java.util.List;
@ -16,10 +6,10 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiEntry; import de.ellpeck.actuallyadditions.booklet.gui.GuiEntry;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiMainPage; import de.ellpeck.actuallyadditions.booklet.gui.GuiMainPage;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiPage; import de.ellpeck.actuallyadditions.booklet.gui.GuiPage;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.common.util.ItemUtil;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;

View file

@ -1,19 +1,9 @@
/*
* This file ("GuiAAAchievements.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
//TODO Achievement GUI? //TODO Achievement GUI?
/* /*
package de.ellpeck.actuallyadditions.mod.booklet.misc; package de.ellpeck.actuallyadditions.booklet.misc;
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; import de.ellpeck.actuallyadditions.common.achievement.InitAchievements;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.common.util.ModUtil;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.achievement.GuiAchievements; import net.minecraft.client.gui.achievement.GuiAchievements;
import net.minecraft.stats.StatisticsManager; import net.minecraft.stats.StatisticsManager;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("BookletPage.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -19,8 +9,8 @@ import java.util.Map;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -28,7 +18,7 @@ import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.OnlyIn;
public class BookletPage implements IBookletPage { public class BookletPage implements IBookletPage {
@ -70,7 +60,7 @@ public class BookletPage implements IBookletPage {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public String getInfoText() { public String getInfoText() {
if (this.hasNoText) { return null; } if (this.hasNoText) { return null; }
@ -88,55 +78,55 @@ public class BookletPage implements IBookletPage {
return base; return base;
} }
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
protected String getLocalizationKey() { protected String getLocalizationKey() {
return "booklet." + ActuallyAdditions.MODID + ".chapter." + this.chapter.getIdentifier() + ".text." + this.localizationKey; return "booklet." + ActuallyAdditions.MODID + ".chapter." + this.chapter.getIdentifier() + ".text." + this.localizationKey;
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void mouseClicked(GuiBookletBase gui, int mouseX, int mouseY, int mouseButton) { public void mouseClicked(GuiBookletBase gui, int mouseX, int mouseY, int mouseButton) {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void mouseReleased(GuiBookletBase gui, int mouseX, int mouseY, int state) { public void mouseReleased(GuiBookletBase gui, int mouseX, int mouseY, int state) {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void mouseClickMove(GuiBookletBase gui, int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) { public void mouseClickMove(GuiBookletBase gui, int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void actionPerformed(GuiBookletBase gui, GuiButton button) { public void actionPerformed(GuiBookletBase gui, GuiButton button) {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void initGui(GuiBookletBase gui, int startX, int startY) { public void initGui(GuiBookletBase gui, int startX, int startY) {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer) { public void updateScreen(GuiBookletBase gui, int startX, int startY, int pageTimer) {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPre(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
} }
@Override @Override
@SideOnly(Side.CLIENT) @OnlyIn(Side.CLIENT)
public void drawScreenPost(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) { public void drawScreenPost(GuiBookletBase gui, int startX, int startY, int mouseX, int mouseY, float partialTicks) {
} }

View file

@ -1,24 +1,14 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("ItemDisplay.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiPage; import de.ellpeck.actuallyadditions.booklet.gui.GuiPage;
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.booklet.misc.BookletUtils;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.common.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.util.ITooltipFlag.TooltipFlags; import net.minecraft.client.util.ITooltipFlag.TooltipFlags;

View file

@ -1,23 +1,12 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageCoffeeMachine.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.common.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.common.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;

View file

@ -1,26 +1,16 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageCrafting.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.util.RefHelp; import de.ellpeck.actuallyadditions.common.util.RefHelp;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.common.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.BlankRecipe; import de.ellpeck.actuallyadditions.common.util.crafting.BlankRecipe;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.Ingredient;

View file

@ -1,23 +1,12 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageCrusherRecipe.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;

View file

@ -1,22 +1,12 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageEmpowerer.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;

View file

@ -1,23 +1,13 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageFurnace.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.client.config.GuiUtils;

View file

@ -1,21 +1,11 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageLinkButton.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.awt.Desktop; import java.awt.Desktop;
import java.net.URI; import java.net.URI;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;

View file

@ -1,17 +1,7 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PagePicture.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.common.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.client.config.GuiUtils;

View file

@ -1,23 +1,13 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageReconstructor.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe; import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.common.util.Util;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;

View file

@ -1,14 +1,4 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageTextOnly.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;

View file

@ -1,21 +1,11 @@
/* package de.ellpeck.actuallyadditions.booklet.page;
* This file ("PageTrials.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.booklet.page;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.common.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave; import de.ellpeck.actuallyadditions.common.data.PlayerData.PlayerSave;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.common.network.PacketHandlerHelper;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;

View file

@ -0,0 +1,7 @@
package de.ellpeck.actuallyadditions.client;
import net.minecraftforge.fml.client.gui.GuiUtils;
public class ClientSetup {
GuiUtils
}

View file

@ -0,0 +1,194 @@
package de.ellpeck.actuallyadditions.common;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.lens.Lens;
import de.ellpeck.actuallyadditions.booklet.InitBooklet;
import de.ellpeck.actuallyadditions.common.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.common.config.ConfigurationHandler;
import de.ellpeck.actuallyadditions.common.crafting.CrusherCrafting;
import de.ellpeck.actuallyadditions.common.data.WorldData;
import de.ellpeck.actuallyadditions.common.entity.InitEntities;
import de.ellpeck.actuallyadditions.common.event.CommonEvents;
import de.ellpeck.actuallyadditions.common.fluids.InitFluids;
import de.ellpeck.actuallyadditions.common.gen.AAWorldGen;
import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.common.items.ItemCoffee;
import de.ellpeck.actuallyadditions.common.items.lens.LensMining;
import de.ellpeck.actuallyadditions.common.items.lens.LensRecipeHandler;
import de.ellpeck.actuallyadditions.common.items.lens.Lenses;
import de.ellpeck.actuallyadditions.common.material.InitArmorMaterials;
import de.ellpeck.actuallyadditions.common.material.InitToolMaterials;
import de.ellpeck.actuallyadditions.common.misc.BannerHelper;
import de.ellpeck.actuallyadditions.common.misc.DungeonLoot;
import de.ellpeck.actuallyadditions.common.misc.apiimpl.LaserRelayConnectionHandler;
import de.ellpeck.actuallyadditions.common.misc.apiimpl.MethodHandler;
import de.ellpeck.actuallyadditions.common.network.PacketHandler;
import de.ellpeck.actuallyadditions.common.proxy.IProxy;
import de.ellpeck.actuallyadditions.common.recipe.EmpowererHandler;
import de.ellpeck.actuallyadditions.common.recipe.HairyBallHandler;
import de.ellpeck.actuallyadditions.common.recipe.TreasureChestHandler;
import de.ellpeck.actuallyadditions.common.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.common.update.UpdateChecker;
import de.ellpeck.actuallyadditions.common.util.compat.CompatUtil;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.server.FMLServerStartedEvent;
import net.minecraftforge.fml.event.server.FMLServerStoppedEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.ForgeRegistry;
import net.minecraftforge.registries.IForgeRegistry;
import net.minecraftforge.registries.RegistryBuilder;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@Mod(ActuallyAdditions.MODID)
public class ActuallyAdditions {
public static final String MODID = ActuallyAdditionsAPI.MOD_ID;
public static final String NAME = "Actually Additions";
// public static final String VERSION = "@VERSION@";
// public static final String GUIFACTORY = "de.ellpeck.actuallyadditions.common.config.GuiFactory";
// public static final String DEPS = "required:forge@[14.23.5.2836,);before:craftingtweaks;after:fastbench@[1.3.2,)";
// public static final boolean DEOBF = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
public static final Logger LOGGER = LogManager.getLogger(MODID);
public static ActuallyAdditions INSTANCE;
public static boolean commonCapsLoaded = false;
// Creative Tab
public static ItemGroup aaGroup = new ItemGroup(MODID) {
@Override
public ItemStack createIcon() {
return new ItemStack(Items.PACKED_ICE); // placeholder until I've done the actual stuff @todo
}
};
public ActuallyAdditions() {
INSTANCE = this;
IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
// Register registers
InitBlocks.BLOCKS.register(bus);
// items
Lenses.LENSES.register(bus);
bus.addListener(this::setup);
bus.addListener(this::clientSetup);
MinecraftForge.EVENT_BUS.register(this);
}
private void setup(final FMLCommonSetupEvent event) {
}
private void clientSetup(final FMLClientSetupEvent event) {
}
@SubscribeEvent
public void serverStarted(FMLServerStartedEvent event) {
// todo: come back to this if it's still needed after migrating the world save to a newer version
// MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
// if (server != null) {
// World world = server.getEntityWorld();
// if (world != null && !world.isRemote) {
// WorldData.get(world, true).markDirty();
// }
// }
}
@SubscribeEvent
public void serverStopped(FMLServerStoppedEvent event) {
WorldData.clear();
}
@SidedProxy(clientSide = "de.ellpeck.actuallyadditions.common.proxy.ClientProxy", serverSide = "de.ellpeck.actuallyadditions.common.proxy.ServerProxy")
public static IProxy PROXY;
static {
FluidRegistry.enableUniversalBucket();
}
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
ActuallyAdditions.LOGGER.info("Starting PreInitialization Phase...");
ActuallyAdditionsAPI.methodHandler = new MethodHandler();
ActuallyAdditionsAPI.connectionHandler = new LaserRelayConnectionHandler();
InitBooklet.preInit();
CompatUtil.registerCraftingTweaks();
// commonCapsLoaded = Loader.isModLoaded("commoncapabilities");
// MinecraftForge.EVENT_BUS.register(new RegistryHandler());
new ConfigurationHandler(event.getSuggestedConfigurationFile());
PacketHandler.init();
InitToolMaterials.init();
InitArmorMaterials.init();
InitFluids.init();
new UpdateChecker();
PROXY.preInit(event);
ActuallyAdditions.LOGGER.info("PreInitialization Finished.");
}
@EventHandler
public void init(FMLInitializationEvent event) {
ActuallyAdditions.LOGGER.info("Starting Initialization Phase...");
BannerHelper.init();
//InitAchievements.init();
GuiHandler.init();
AAWorldGen gen = new AAWorldGen();
GameRegistry.registerWorldGenerator(gen, 10000);
MinecraftForge.TERRAIN_GEN_BUS.register(gen);
TileEntityBase.init();
MinecraftForge.EVENT_BUS.register(new CommonEvents());
MinecraftForge.EVENT_BUS.register(new DungeonLoot());
InitEntities.init();
PROXY.init(event);
RegistryHandler.BLOCKS_TO_REGISTER.clear();
ActuallyAdditions.LOGGER.info("Initialization Finished.");
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
ActuallyAdditions.LOGGER.info("Starting PostInitialization Phase...");
ItemCoffee.initIngredients();
CrusherCrafting.init();
HairyBallHandler.init();
TreasureChestHandler.init();
LensRecipeHandler.init();
EmpowererHandler.init();
LensMining.init();
InitBooklet.postInit();
PROXY.postInit(event);
ConfigurationHandler.redefineConfigs();
ActuallyAdditions.LOGGER.info("PostInitialization Finished.");
}
}

View file

@ -1,24 +1,24 @@
package de.ellpeck.actuallyadditions.mod; package de.ellpeck.actuallyadditions.common;
import java.util.HashMap; import de.ellpeck.actuallyadditions.common.blocks.render.ActualCompostModel;
import java.util.Map; import de.ellpeck.actuallyadditions.common.blocks.render.CompostModel;
import de.ellpeck.actuallyadditions.common.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.blocks.render.ActualCompostModel; import de.ellpeck.actuallyadditions.common.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.blocks.render.CompostModel; import de.ellpeck.actuallyadditions.common.util.FluidStateMapper;
import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelBakery; import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.fluid.Fluid;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent; import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.util.HashMap;
import java.util.Map;
public class ClientRegistryHandler { public class ClientRegistryHandler {

View file

@ -0,0 +1,62 @@
package de.ellpeck.actuallyadditions.common;
//Class to wrap around the trainwreck that is the new registry system
// @todo: remove this completely
@Deprecated
public class RegistryHandler {
//
// public static final List<Block> BLOCKS_TO_REGISTER = new ArrayList<>();
// public static final List<Item> ITEMS_TO_REGISTER = new ArrayList<>();
// public static final List<SoundEvent> SOUNDS_TO_REGISTER = new ArrayList<>();
// public static final List<IRecipe> RECIPES_TO_REGISTER = new ArrayList<>();
//
// @SubscribeEvent
// public void onBlockRegistry(Register<Block> event) {
// InitBlocks.init();
//
// for (Block block : BLOCKS_TO_REGISTER) {
// event.getRegistry().register(block);
// }
// }
//
// @SubscribeEvent
// public void onItemRegistry(Register<Item> event) {
// InitItems.init();
//
// for (Item item : ITEMS_TO_REGISTER) {
// event.getRegistry().register(item);
// }
// ITEMS_TO_REGISTER.clear();
//
// //Hack to make this register before recipes :>
// InitOreDict.init();
// }
//
// @SubscribeEvent
// public void onVillagerRegistry(Register<VillagerProfession> event) {
// InitVillager.init();
//
// if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.jamProfession);
// if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.engineerProfession);
// }
//
// @SubscribeEvent
// public void onCraftingRegistry(Register<IRecipe> event) {
// InitCrafting.init();
//
// for (IRecipe recipe : RECIPES_TO_REGISTER) {
// event.getRegistry().register(recipe);
// }
// RECIPES_TO_REGISTER.clear();
// }
//
// @SubscribeEvent
// public void onSoundRegistry(Register<SoundEvent> event) {
// SoundHandler.init();
//
// for (SoundEvent sound : SOUNDS_TO_REGISTER) {
// event.getRegistry().register(sound);
// }
// SOUNDS_TO_REGISTER.clear();
// }
}

View file

@ -1,18 +1,8 @@
/*
* This file ("InitAchievements.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
//TODO Achievements -> Advancements? //TODO Achievements -> Advancements?
/* /*
package de.ellpeck.actuallyadditions.mod.achievement; package de.ellpeck.actuallyadditions.common.achievement;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.common.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.stats.Achievement; import net.minecraft.stats.Achievement;
import net.minecraftforge.common.AchievementPage; import net.minecraftforge.common.AchievementPage;

View file

@ -1,23 +1,13 @@
/*
* This file ("TheAchievements.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
//TODO Fix achievements //TODO Fix achievements
/* /*
package de.ellpeck.actuallyadditions.mod.achievement; package de.ellpeck.actuallyadditions.common.achievement;
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements.Type; import de.ellpeck.actuallyadditions.common.achievement.InitAchievements.Type;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.common.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.common.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.common.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.common.util.Util;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.init.Items; import net.minecraft.init.Items;

View file

@ -0,0 +1,163 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.api.lens.ILensItem;
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.config.values.ConfigIntValues;
import de.ellpeck.actuallyadditions.common.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.common.util.AssetUtil;
import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.common.util.StringUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import java.util.List;
public class BlockAtomicReconstructor extends BlockContainerBase implements IHudDisplay {
public static final int NAME_FLAVOR_AMOUNTS_1 = 12;
public static final int NAME_FLAVOR_AMOUNTS_2 = 14;
public BlockAtomicReconstructor() {
super(STONE_PROPS.hardnessAndResistance(10f, 80f));
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit){
ItemStack heldItem = player.getHeldItem(hand);
if (this.tryToggleRedstone(world, pos, player)) {
return ActionResultType.SUCCESS;
}
if (!world.isRemote) {
TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getTileEntity(pos);
if (reconstructor != null) {
if (StackUtil.isValid(heldItem)) {
Item item = heldItem.getItem();
if (item instanceof ILensItem && !StackUtil.isValid(reconstructor.inv.getStackInSlot(0))) {
ItemStack toPut = heldItem.copy();
toPut.setCount(1);
reconstructor.inv.setStackInSlot(0, toPut);
player.inventory.decrStackSize(player.inventory.currentItem, 1);
}
//Shush, don't tell anyone!
else if (ConfigIntValues.ELEVEN.getValue() == 11 && item == Items.MUSIC_DISC_11) {
reconstructor.counter++;
reconstructor.markDirty();
}
} else {
ItemStack slot = reconstructor.inv.getStackInSlot(0);
if (StackUtil.isValid(slot)) {
player.setHeldItem(hand, slot.copy());
reconstructor.inv.setStackInSlot(0, StackUtil.getEmpty());
}
}
}
}
return ActionResultType.SUCCESS;
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world){
return new TileEntityAtomicReconstructor();
}
@Override
@OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, BlockRayTraceResult posHit, MainWindow window) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getPos());
if (tile instanceof TileEntityAtomicReconstructor) {
ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0);
ITextComponent displayString;
if (!StackUtil.isValid(slot)) {
displayString = new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".noLens");
} else {
displayString = slot.getItem().getDisplayName(slot);
AssetUtil.renderStackToGui(slot, window.getScaledWidth() / 2 + 15, window.getScaledHeight() / 2 - 19, 1F);
}
minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW + "" + TextFormatting.ITALIC + displayString.getFormattedText(), window.getScaledWidth() / 2 + 35, window.getScaledHeight() / 2 - 15, StringUtil.DECIMAL_COLOR_WHITE);
}
}
@Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder){
builder.add(BlockStateProperties.FACING);
}
@Override
public BlockState rotate(BlockState state, Rotation rot){
return state.with(BlockStateProperties.FACING, rot.rotate(state.get(BlockStateProperties.FACING)));
}
@Override
public BlockState mirror(BlockState state, Mirror mirrorIn){
return this.rotate(state, mirrorIn.toRotation(state.get(BlockStateProperties.FACING)));
}
@Override
public boolean hasComparatorInputOverride(BlockState state){
return true;
}
@Override
public int getComparatorInputOverride(BlockState blockState, World world, BlockPos pos) {
TileEntity t = world.getTileEntity(pos);
int i = 0;
if (t instanceof TileEntityAtomicReconstructor) {
i = ((TileEntityAtomicReconstructor) t).getEnergy();
}
return MathHelper.clamp(i / 20000, 0, 15);
}
public class BlockItem extends net.minecraft.item.BlockItem {
private long lastSysTime;
private int toPick1;
private int toPick2;
public BlockItem() {
super(BlockAtomicReconstructor.this, new Properties());
}
@Override
public void addInformation(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flag){
long sysTime = System.currentTimeMillis();
if (this.lastSysTime + 3000 < sysTime) {
this.lastSysTime = sysTime;
if (world != null) {
this.toPick1 = world.rand.nextInt(NAME_FLAVOR_AMOUNTS_1) + 1;
this.toPick2 = world.rand.nextInt(NAME_FLAVOR_AMOUNTS_2) + 1;
}
}
String base = String.format("tile.%s.%s.info", ActuallyAdditions.MODID, BlockAtomicReconstructor.this.getRegistryName().getPath());
tooltip.add(new TranslationTextComponent(String.format("%s1.%s", base, this.toPick1)).appendSibling(new TranslationTextComponent(String.format("%s2.%s", base, this.toPick2))));
}
}
}

View file

@ -0,0 +1,64 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.items.ItemBattery;
import de.ellpeck.actuallyadditions.common.tile.TileEntityBatteryBox;
import de.ellpeck.actuallyadditions.common.util.StackUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
public class BlockBatteryBox extends BlockContainerBase {
public static final VoxelShape SHAPE = Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
public BlockBatteryBox() {
super(STONE_PROPS_WITH_HARDNESS.harvestLevel(0));
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context){
return SHAPE;
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit){
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityBatteryBox) {
TileEntityBatteryBox box = (TileEntityBatteryBox) tile;
ItemStack stack = player.getHeldItem(hand);
if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemBattery && !StackUtil.isValid(box.inv.getStackInSlot(0))) {
box.inv.setStackInSlot(0, stack.copy());
player.setHeldItem(hand, StackUtil.getEmpty());
return ActionResultType.SUCCESS;
}
} else {
ItemStack inSlot = box.inv.getStackInSlot(0);
if (StackUtil.isValid(inSlot)) {
player.setHeldItem(hand, inSlot.copy());
box.inv.setStackInSlot(0, StackUtil.getEmpty());
return ActionResultType.SUCCESS;
}
}
}
return super.onBlockActivated(state, world, pos, player, hand, hit);
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world){
return new TileEntityBatteryBox();
}
}

View file

@ -0,0 +1,36 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.tile.TileEntityBioReactor;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
public class BlockBioReactor extends BlockContainerBase {
public BlockBioReactor() {
super(STONE_PROPS.hardnessAndResistance(2f, 10.0f));
}
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world){
return new TileEntityBioReactor();
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit){
if (!world.isRemote) {
if (world.getTileEntity(pos) instanceof TileEntityBioReactor) {
// todo open gui:
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.BIO_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
}
return ActionResultType.SUCCESS;
}
}

View file

@ -0,0 +1,17 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockBushBase;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraftforge.common.ToolType;
public class BlockBlackLotus extends BlockBushBase {
public BlockBlackLotus() {
super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
.harvestTool(ToolType.PICKAXE)
.sound(SoundType.STONE));
}
}

View file

@ -0,0 +1,76 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.tile.TileEntityBreaker;
import de.ellpeck.actuallyadditions.common.tile.TileEntityPlacer;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import javax.annotation.Nullable;
public class BlockBreaker extends BlockContainerBase {
public static final DirectionProperty FACING = BlockStateProperties.FACING;
private final boolean isPlacer;
public BlockBreaker(boolean isPlacer) {
super(STONE_PROPS);
this.isPlacer = isPlacer;
setDefaultState(getStateContainer().getBaseState().with(FACING, Direction.SOUTH));
}
@Nullable
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return this.isPlacer ? new TileEntityPlacer() : new TileEntityBreaker();
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
if (this.tryToggleRedstone(world, pos, player)) { return ActionResultType.SUCCESS; }
if (!world.isRemote) {
TileEntityBreaker breaker = (TileEntityBreaker) world.getTileEntity(pos);
if (breaker != null) {
// todo: come back to this once we have guis
// NetworkHooks.openGui(player, new SimpleNamedContainerProvider(());
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.BREAKER.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
return ActionResultType.SUCCESS;
}
return ActionResultType.SUCCESS;
}
@Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
super.fillStateContainer(builder);
builder.add(FACING);
}
@Nullable
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
// @todo: might be wrong
return getDefaultState().with(FACING, context.getFace().getOpposite());
}
// @Override
// public IBlockState withRotation(IBlockState state, Rotation rot) {
// return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING)));
// }
//
// @Override
// public IBlockState withMirror(IBlockState state, Mirror mirror) {
// return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING)));
// }
}

View file

@ -0,0 +1,54 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.tile.TileEntityCanolaPress;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import javax.annotation.Nullable;
public class BlockCanolaPress extends BlockContainerBase {
public BlockCanolaPress() {
super(STONE_PROPS);
}
// @Override
// public boolean isFullCube(IBlockState state) {
// return false;
// }
//
// @Override
// public boolean isOpaqueCube(IBlockState state) {
// return false;
// }
@Nullable
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new TileEntityCanolaPress();
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) {
TileEntityCanolaPress press = (TileEntityCanolaPress) world.getTileEntity(pos);
if (press != null) {
if (!this.tryUseItemOnTank(player, hand, press.tank)) {
// todo: add back
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.CANOLA_PRESS.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
}
return ActionResultType.SUCCESS;
}
return super.onBlockActivated(state, world, pos, player, hand, hit);
}
}

View file

@ -0,0 +1,85 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.tile.TileEntityCoalGenerator;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.common.ToolType;
import javax.annotation.Nullable;
import java.util.Random;
public class BlockCoalGenerator extends BlockContainerBase {
public BlockCoalGenerator() {
super(Block.Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
.harvestTool(ToolType.PICKAXE)
.sound(SoundType.STONE)
.tickRandomly());
}
// @Override
// public boolean isFullCube(IBlockState state) {
// return false;
// }
//
// @Override
// public boolean isOpaqueCube(IBlockState state) {
// return false;
// }
@Nullable
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new TileEntityCoalGenerator();
}
@Override
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileEntityCoalGenerator) {
if (((TileEntityCoalGenerator) tile).currentBurnTime > 0) {
for (int i = 0; i < 5; i++) {
// todo: check count and speed params
world.spawnParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, i,0.0D, 0.0D, 0.0D, 1);
}
}
}
}
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) {
TileEntityCoalGenerator press = (TileEntityCoalGenerator) world.getTileEntity(pos);
if (press != null) {
// todo: add back
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.COAL_GENERATOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
return ActionResultType.SUCCESS;
}
return super.onBlockActivated(state, world, pos, player, hand, hit);
}
// @Override
// public IBlockState withRotation(IBlockState state, Rotation rot) {
// return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING)));
// }
//
// @Override
// public IBlockState withMirror(IBlockState state, Mirror mirror) {
// return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING)));
// }
}

View file

@ -0,0 +1,96 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.tile.TileEntityCoffeeMachine;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import javax.annotation.Nullable;
public class BlockCoffeeMachine extends BlockContainerBase {
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
// private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 1 - 0.0625 * 2, 1 - 0.0625);
private static final VoxelShape SHAPE = Block.makeCuboidShape(1, 0, 1, 15, 14, 15); // might be wrong, correct is above
public BlockCoffeeMachine() {
super(STONE_PROPS);
setDefaultState(getStateContainer().getBaseState().with(FACING, Direction.SOUTH));
}
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
return SHAPE;
}
// @Override
// public boolean isFullCube(IBlockState state) {
// return false;
// }
//
// @Override
// public boolean isOpaqueCube(IBlockState state) {
// return false;
// }
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) {
TileEntityCoffeeMachine machine = (TileEntityCoffeeMachine) world.getTileEntity(pos);
if (machine != null) {
if (!this.tryUseItemOnTank(player, hand, machine.tank)) {
// todo: add back
// player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.COFFEE_MACHINE.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
}
}
return ActionResultType.SUCCESS;
}
return super.onBlockActivated(state, world, pos, player, hand, hit);
}
@Nullable
@Override
public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new TileEntityCoffeeMachine();
}
@Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
super.fillStateContainer(builder);
builder.add(FACING);
}
@Nullable
@Override
public BlockState getStateForPlacement(BlockItemUseContext context) {
return getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
}
// @Override
// public IBlockState withRotation(IBlockState state, Rotation rot) {
// return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING)));
// }
//
// @Override
// public IBlockState withMirror(IBlockState state, Mirror mirror) {
// return this.withRotation(state, mirror.toRotation(state.getValue(BlockHorizontal.FACING)));
// }
}

View file

@ -0,0 +1,130 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.blocks.metalists.TheColoredLampColors;
import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.common.util.StringUtil;
import de.ellpeck.actuallyadditions.common.util.Util;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockColoredLamp extends Block {
// todo: replace with flattered versions
// public static final TheColoredLampColors[] ALL_LAMP_TYPES = TheColoredLampColors.values();
// public static final PropertyEnum<TheColoredLampColors> TYPE = PropertyEnum.create("type", TheColoredLampColors.class);
public final boolean isOn;
public BlockColoredLamp(boolean isOn) {
super(Block.Properties.create(Material.REDSTONE_LIGHT)
.hardnessAndResistance(0.5f, 3.0f)
.harvestTool(ToolType.PICKAXE));
this.isOn = isOn;
}
// @Override
// public Item getItemDropped(Block block) {
// return Item.getItemFromBlock(InitBlocks.blockColoredLamp);
// }
// @Override
// public int damageDropped(BlockState state) {
// return this.getMetaFromState(state);
// }
// todo: re-implement
@Override
public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
// ItemStack stack = player.getHeldItem(hand);
// //Turning On
// if (hand == EnumHand.MAIN_HAND && stack.isEmpty()) {
// world.setBlockState(pos, (this.isOn ? InitBlocks.blockColoredLamp : InitBlocks.blockColoredLampOn).getDefaultState().withProperty(TYPE, state.getValue(TYPE)), 2);
// world.notifyLightSet(pos);
// return true;
// }
//
// if (StackUtil.isValid(stack)) {
// //Changing Colors
// int[] oreIDs = OreDictionary.getOreIDs(stack);
// if (oreIDs.length > 0) {
// for (int oreID : oreIDs) {
// String name = OreDictionary.getOreName(oreID);
// TheColoredLampColors color = TheColoredLampColors.getColorFromDyeName(name);
// if (color != null) {
// if (this.getMetaFromState(state) != color.ordinal()) {
// if (!world.isRemote) {
// world.setBlockState(pos, this.getStateFromMeta(color.ordinal()), 2);
// if (!player.capabilities.isCreativeMode) {
// player.inventory.decrStackSize(player.inventory.currentItem, 1);
// }
// }
// return true;
// }
// }
// }
// }
// }
return super.onBlockActivated(state, worldIn, pos, player, handIn, hit);
}
// @Override
// @SideOnly(Side.CLIENT)
// public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
// for (int j = 0; j < ALL_LAMP_TYPES.length; j++) {
// list.add(new ItemStack(this, 1, j));
// }
// }
@Override
public int getLightValue(BlockState state) {
return this.isOn ? 15 : 0;
}
// @Override
// public void registerRendering() {
// for (int i = 0; i < ALL_LAMP_TYPES.length; i++) {
// ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_LAMP_TYPES[i].regName);
// }
// }
// @Override
// protected BlockStateContainer createBlockState() {
// return new BlockStateContainer(this, TYPE);
// }
//
// public static class TheItemBlock extends BlockItem {
//
// public TheItemBlock(Block block) {
// super(block);
// this.setHasSubtypes(true);
// this.setMaxDamage(0);
// }
//
// @Override
// public String getItemStackDisplayName(ItemStack stack) {
// if (stack.getItemDamage() >= ALL_LAMP_TYPES.length) { return StringUtil.BUGGED_ITEM_NAME; }
// if (Util.isClient()) return super.getItemStackDisplayName(stack) + (((BlockColoredLamp) this.block).isOn ? " (" + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".onSuffix.desc") + ")" : "");
// else return super.getItemStackDisplayName(stack);
// }
//
// @Override
// public String getTranslationKey(ItemStack stack) {
// return InitBlocks.blockColoredLamp.getTranslationKey() + "_" + ALL_LAMP_TYPES[stack.getItemDamage()].regName;
// }
// }
}

View file

@ -0,0 +1,214 @@
// todo: remove
//package de.ellpeck.actuallyadditions.common.blocks;
//
//import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
//import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
//import de.ellpeck.actuallyadditions.common.tile.TileEntityCompost;
//import de.ellpeck.actuallyadditions.common.util.AssetUtil;
//import de.ellpeck.actuallyadditions.common.util.ItemUtil;
//import de.ellpeck.actuallyadditions.common.util.StackUtil;
//import de.ellpeck.actuallyadditions.common.util.StringUtil;
//import net.minecraft.block.Block;
//import net.minecraft.block.SoundType;
//import net.minecraft.block.material.Material;
//import net.minecraft.block.state.BlockStateContainer;
//import net.minecraft.block.state.IBlockState;
//import net.minecraft.client.Minecraft;
//import net.minecraft.client.gui.ScaledResolution;
//import net.minecraft.entity.Entity;
//import net.minecraft.entity.player.EntityPlayer;
//import net.minecraft.item.EnumRarity;
//import net.minecraft.item.ItemStack;
//import net.minecraft.state.IProperty;
//import net.minecraft.tileentity.TileEntity;
//import net.minecraft.util.BlockRenderLayer;
//import net.minecraft.util.EnumFacing;
//import net.minecraft.util.EnumHand;
//import net.minecraft.util.math.AxisAlignedBB;
//import net.minecraft.util.math.BlockPos;
//import net.minecraft.util.math.RayTraceResult;
//import net.minecraft.util.text.TextFormatting;
//import net.minecraft.world.IBlockAccess;
//import net.minecraft.world.World;
//import net.minecraftforge.common.ToolType;
//import net.minecraftforge.common.property.ExtendedBlockState;
//import net.minecraftforge.common.property.IExtendedBlockState;
//import net.minecraftforge.common.property.IUnlistedProperty;
//import net.minecraftforge.fml.relauncher.Side;
//import net.minecraftforge.fml.relauncher.SideOnly;
//import org.apache.commons.lang3.tuple.Pair;
//
//import java.util.List;
//
//public class BlockCompost extends BlockContainerBase implements IHudDisplay {
//
// protected static final AxisAlignedBB AABB_LEGS = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.3125D, 1.0D);
// protected static final AxisAlignedBB AABB_WALL_NORTH = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D);
// protected static final AxisAlignedBB AABB_WALL_SOUTH = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 1.0D, 1.0D);
// protected static final AxisAlignedBB AABB_WALL_EAST = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
// protected static final AxisAlignedBB AABB_WALL_WEST = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D);
// private static final AxisAlignedBB AABB = new AxisAlignedBB(0.0625, 0, 0.0625, 1 - 0.0625, 11 * 0.0625, 1 - 0.0625);
//
// public BlockCompost() {
// super(Block.Properties.create(Material.WOOD)
// .hardnessAndResistance(0.5f, 5.0f)
// .harvestTool(ToolType.AXE)
// .sound(SoundType.WOOD));
// }
//
// @Override
// public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
// return AABB;
// }
//
// @Override
// @Deprecated
// public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean someBool) {
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_LEGS);
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_WEST);
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_NORTH);
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_EAST);
// addCollisionBoxToList(pos, entityBox, collidingBoxes, AABB_WALL_SOUTH);
// }
//
// @Override
// public boolean isOpaqueCube(IBlockState state) {
// return false;
// }
//
// @Override
// public boolean isFullCube(IBlockState state) {
// return false;
// }
//
// @Override
// public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing f6, float f7, float f8, float f9) {
// ItemStack stackPlayer = player.getHeldItem(hand);
// if (!world.isRemote) {
// TileEntity tile = world.getTileEntity(pos);
// if (tile instanceof TileEntityCompost) {
// TileEntityCompost compost = (TileEntityCompost) tile;
// ItemStack slot = compost.inv.getStackInSlot(0);
// CompostRecipe recipeIn = TileEntityCompost.getRecipeForInput(slot);
// if (!StackUtil.isValid(slot) || recipeIn != null) {
// if (StackUtil.isValid(stackPlayer)) {
// CompostRecipe recipeHand = TileEntityCompost.getRecipeForInput(stackPlayer);
// if (recipeHand != null && (recipeIn == null || recipeIn == recipeHand)) {
// int maxAdd = stackPlayer.getCount();
//
// if (!StackUtil.isValid(slot)) {
// ItemStack stackToAdd = stackPlayer.copy();
// stackToAdd.setCount(maxAdd);
// compost.inv.setStackInSlot(0, stackToAdd);
// player.inventory.decrStackSize(player.inventory.currentItem, maxAdd);
// return true;
// } else {
// ItemStack stackIn = slot.copy();
// if (stackIn.getCount() < slot.getMaxStackSize()) {
// int sizeAdded = Math.min(maxAdd, slot.getMaxStackSize() - stackIn.getCount());
// stackIn.grow(sizeAdded);
// compost.inv.setStackInSlot(0, stackIn);
// player.inventory.decrStackSize(player.inventory.currentItem, sizeAdded);
// return true;
// }
// }
// }
// }
// } else {
// if (!StackUtil.isValid(stackPlayer)) {
// player.setHeldItem(hand, slot.copy());
// compost.inv.setStackInSlot(0, StackUtil.getEmpty());
// return true;
// } else if (ItemUtil.canBeStacked(stackPlayer, slot)) {
// int addedStackSize = Math.min(slot.getCount(), stackPlayer.getMaxStackSize() - stackPlayer.getCount());
// ItemStack stackToAdd = stackPlayer.copy();
// stackToAdd.grow(addedStackSize);
// player.setHeldItem(hand, stackToAdd);
// compost.inv.getStackInSlot(0).shrink(addedStackSize);
// return true;
//
// }
// }
// tile.markDirty();
// world.notifyBlockUpdate(pos, this.getDefaultState(), this.getDefaultState(), 3);
// }
// } else {
// return true;
// }
// return false;
// }
//
// @Override
// public TileEntity createNewTileEntity(World world, int meta) {
// return new TileEntityCompost();
// }
//
// @Override
// public EnumRarity getRarity(ItemStack stack) {
// return EnumRarity.UNCOMMON;
// }
//
// @Override
// @SideOnly(Side.CLIENT)
// public void displayHud(Minecraft minecraft, EntityPlayer player, ItemStack stack, RayTraceResult posHit, ScaledResolution resolution) {
// TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos());
// if (tile instanceof TileEntityCompost) {
// ItemStack slot = ((TileEntityCompost) tile).inv.getStackInSlot(0);
// String strg;
// if (!StackUtil.isValid(slot)) {
// strg = "Empty";
// } else {
// strg = slot.getDisplayName();
//
// AssetUtil.renderStackToGui(slot, resolution.getScaledWidth() / 2 + 15, resolution.getScaledHeight() / 2 - 29, 1F);
// }
// minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW + "" + TextFormatting.ITALIC + strg, resolution.getScaledWidth() / 2 + 35, resolution.getScaledHeight() / 2 - 25, StringUtil.DECIMAL_COLOR_WHITE);
// }
// }
//
// @Override
// protected BlockStateContainer createBlockState() {
// return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[] { COMPOST_PROP });
// }
//
// @Override
// public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
// TileEntity te = world.getTileEntity(pos);
// if (te instanceof TileEntityCompost && state instanceof IExtendedBlockState) {
// TileEntityCompost compost = (TileEntityCompost) te;
// return ((IExtendedBlockState) state).withProperty(COMPOST_PROP, Pair.of(compost.getCurrentDisplay(), compost.getHeight()));
// }
// return state;
// }
//
// public BlockRenderLayer getBlockLayer() {
// return BlockRenderLayer.CUTOUT;
// }
//
// public static CompostProperty COMPOST_PROP = new CompostProperty();
//
// @SuppressWarnings("rawtypes")
// private static class CompostProperty implements IProperty<Pair> {
//
// @Override
// public String getName() {
// return "compost";
// }
//
// @Override
// public boolean isValid(Pair value) {
// return true;
// }
//
// @Override
// public Class<Pair> getType() {
// return Pair.class;
// }
//
// @Override
// public String valueToString(Pair value) {
// return "";
// }
//
// }
//}

View file

@ -1,46 +1,38 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockCrystal.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.BlockItem;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraftforge.common.IRarity; import net.minecraftforge.common.IRarity;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockCrystal extends BlockBase { public class BlockCrystal extends Block {
public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values(); public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values();
private static final PropertyEnum<TheCrystals> TYPE = PropertyEnum.create("type", TheCrystals.class); private static final PropertyEnum<TheCrystals> TYPE = PropertyEnum.create("type", TheCrystals.class);
private final boolean isEmpowered; private final boolean isEmpowered;
public BlockCrystal(String name, boolean isEmpowered) { public BlockCrystal(boolean isEmpowered) {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
.harvestTool(ToolType.PICKAXE)
.sound(SoundType.STONE));
this.isEmpowered = isEmpowered; this.isEmpowered = isEmpowered;
this.setHardness(1.5F);
this.setResistance(10.0F);
this.setHarvestLevel("pickaxe", 1);
} }
@Override @Override
@ -57,7 +49,7 @@ public class BlockCrystal extends BlockBase {
} }
@Override @Override
protected ItemBlockBase getItemBlock() { protected BlockItemBase getItemBlock() {
return new TheItemBlock(this); return new TheItemBlock(this);
} }
@ -83,12 +75,7 @@ public class BlockCrystal extends BlockBase {
return new BlockStateContainer(this, TYPE); return new BlockStateContainer(this, TYPE);
} }
@Override public static class TheItemBlock extends BlockItem {
public IRarity getRarity(ItemStack stack) {
return stack.getItemDamage() >= ALL_CRYSTALS.length ? EnumRarity.COMMON : ALL_CRYSTALS[stack.getItemDamage()].rarity;
}
public static class TheItemBlock extends ItemBlockBase {
public TheItemBlock(Block block) { public TheItemBlock(Block block) {
super(block); super(block);

View file

@ -0,0 +1,97 @@
package de.ellpeck.actuallyadditions.common.blocks;
import de.ellpeck.actuallyadditions.common.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.common.util.IColorProvidingBlock;
import de.ellpeck.actuallyadditions.common.util.IColorProvidingItem;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class BlockCrystalCluster extends Block implements IColorProvidingBlock, IColorProvidingItem {
private final TheCrystals crystal;
public BlockCrystalCluster(TheCrystals crystal) {
super(Properties.create(Material.GLASS)
.hardnessAndResistance(0.25f, 1.0f)
.sound(SoundType.GLASS)
.lightValue(7));
this.crystal = crystal;
}
@Override
public int getOpacity(BlockState state, IBlockReader worldIn, BlockPos pos){
return 1;
}
@Override
public BlockState getStateForPlacement(BlockItemUseContext context){
return super.getStateForPlacement(context).with(BlockStateProperties.FACING, context.getPlacementHorizontalFacing().getOpposite());
}
@Override
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder){
builder.add(BlockStateProperties.FACING);
}
@Override
public BlockState rotate(BlockState state, Rotation rot){
return state.with(BlockStateProperties.FACING, rot.rotate(state.get(BlockStateProperties.FACING)));
}
@Override
public BlockState mirror(BlockState state, Mirror mirror){
return this.rotate(state, mirror.toRotation(state.get(BlockStateProperties.FACING)));
}
@Override
@OnlyIn(Dist.CLIENT)
public IBlockColor getBlockColor() {
return (state, world, pos, tintIndex) -> BlockCrystalCluster.this.crystal.clusterColor;
}
@Override
@OnlyIn(Dist.CLIENT)
public IItemColor getItemColor() {
return (stack, tintIndex) -> BlockCrystalCluster.this.crystal.clusterColor;
}
/* todo canitzp: realise block drops with loot tables
@Override
public Item getItemDropped(BlockState state, Random rand, int fortune) {
return InitItems.itemCrystalShard;
}
@Override
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder){
return Collections.singletonList(new ItemStack(InitItems.itemCrystalShard, new Random().nextInt(5) + 2));
}
@Override
public int damageDropped(BlockState state) {
return ArrayUtils.indexOf(WorldGenLushCaves.CRYSTAL_CLUSTERS, this);
}
@Override
public void onBlockHarvested(World worldIn, BlockPos pos, BlockState state, PlayerEntity player){
super.onBlockHarvested(worldIn, pos, state, player);
}
@Override
public boolean canSilkHarvest(World world, BlockPos pos, IBlockState state, EntityPlayer player) {
return true;
}*/
}

View file

@ -1,19 +1,9 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockDirectionalBreaker.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.common.tile.TileEntityDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockDirectional;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -30,15 +20,15 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockDirectionalBreaker extends BlockContainerBase { public class BlockDirectionalBreaker extends BlockContainerBase {
public BlockDirectionalBreaker(String name) { public BlockDirectionalBreaker() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,19 +1,9 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockDisplayStand.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.tile.TileEntityDisplayStand;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.common.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.BlockFaceShape;
@ -28,16 +18,15 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockDisplayStand extends BlockContainerBase { public class BlockDisplayStand extends BlockContainerBase {
public BlockDisplayStand(String name) { public BlockDisplayStand() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
this.setHarvestLevel("pickaxe", 0); .harvestTool(ToolType.PICKAXE)
this.setHardness(1.5F); .sound(SoundType.STONE));
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,19 +1,10 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockDropper.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.common.tile.TileEntityDropper;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import net.minecraft.block.Block;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockDirectional;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -30,15 +21,15 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockDropper extends BlockContainerBase { public class BlockDropper extends BlockContainerBase {
public BlockDropper(String name) { public BlockDropper() {
super(Material.ROCK, name); super(Block.Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,19 +1,9 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockEmpowerer.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.common.tile.TileEntityEmpowerer;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.common.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer; import de.ellpeck.actuallyadditions.common.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -27,16 +17,15 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockEmpowerer extends BlockContainerBase { public class BlockEmpowerer extends BlockContainerBase {
public BlockEmpowerer(String name) { public BlockEmpowerer() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
this.setHarvestLevel("pickaxe", 0); .harvestTool(ToolType.PICKAXE)
this.setHardness(1.5F); .sound(SoundType.STONE));
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,20 +1,11 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockEnergizer.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.common.tile.TileEntityEnergizer;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.common.tile.TileEntityEnervator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import net.minecraft.block.Block;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -26,18 +17,19 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockEnergizer extends BlockContainerBase { public class BlockEnergizer extends BlockContainerBase {
private final boolean isEnergizer; private final boolean isEnergizer;
public BlockEnergizer(boolean isEnergizer, String name) { public BlockEnergizer(boolean isEnergizer) {
super(Material.ROCK, name); super(Block.Properties.create(Material.ROCK)
.hardnessAndResistance(2.0f, 100f)
.harvestTool(ToolType.PICKAXE)
.sound(SoundType.STONE));
this.isEnergizer = isEnergizer; this.isEnergizer = isEnergizer;
this.setHarvestLevel("pickaxe", 0);
this.setHardness(2.0F);
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,19 +1,9 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockFarmer.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.common.tile.TileEntityFarmer;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer;
import net.minecraft.block.BlockHorizontal; import net.minecraft.block.BlockHorizontal;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -30,15 +20,15 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockFarmer extends BlockContainerBase { public class BlockFarmer extends BlockContainerBase {
public BlockFarmer(String name) { public BlockFarmer() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,39 +1,29 @@
/* package de.ellpeck.actuallyadditions.common.blocks;
* This file ("BlockFeeder.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.common.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.common.tile.TileEntityFeeder;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import net.minecraft.block.Block;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockFeeder extends BlockContainerBase { public class BlockFeeder extends BlockContainerBase {
public BlockFeeder(String name) { public BlockFeeder() {
super(Material.ROCK, name); super(Block.Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(0.5f, 6.0f)
this.setHardness(0.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(6.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override
@ -52,9 +42,4 @@ public class BlockFeeder extends BlockContainerBase {
} }
return true; return true;
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.UNCOMMON;
}
} }

Some files were not shown because too many files have changed in this diff Show more